From d81f1862f733a596b97320860251b01c997db20a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 5 Jul 2024 17:53:55 -0400 Subject: [PATCH] refactor(php): remove php-cs-fixer This removes the php-cs-fixer.el package. This is not a breaking change because the package hasn't been this module's default formatter since 4ecd616. It has since been replaced by phpcbf (provided by squizlabs/php_codesniffer). Amend: 4ecd616cd8f6 --- modules/lang/php/README.org | 9 ++------- modules/lang/php/packages.el | 3 --- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/lang/php/README.org b/modules/lang/php/README.org index a0de2d973..d2ea8b398 100644 --- a/modules/lang/php/README.org +++ b/modules/lang/php/README.org @@ -41,7 +41,6 @@ This module adds support for PHP 5.3+ (including PHP8) to Doom Emacs. - [[doom-package:async]] - [[doom-package:hack-mode]] if [[doom-module:+hack]] - [[doom-package:psysh]] -- [[doom-package:php-cs-fixer]] if [[doom-package::editor format]] - [[doom-package:php-extras]] - [[doom-package:php-mode]] - [[doom-package:php-refactor-mode]] @@ -121,7 +120,7 @@ The others have to be installed manually and added to your =$PATH=. - ~pysh~ (REPL) - ~phpctags~ (better code completion) - ~phpunit~ (unit test commands) -- ~php-cs-fixer~ and ~@prettier/plugin-php~ (for code formatting) +- ~phpcbf~, provided by ~squizlabs/php_codesniffer~ (for code formatting) + ~phpactor~ (for LSP if intelephense isn't desired) #+begin_src sh @@ -129,12 +128,8 @@ composer global require \ psy/psysh \ phpunit/phpunit \ techlivezheng/phpctags \ - friendsofphp/php-cs-fixer \ + squizlabs/php_codesniffer \ phpactor/phpactor - -# Needed by php-cs-fixer, otherwise you'll get "Couldn't resolve parser -# 'php'" errors -npm install -g @prettier/plugin-php #+end_src You must ensure that =$HOME/.composer/vendor/bin= is in =$PATH=, so these diff --git a/modules/lang/php/packages.el b/modules/lang/php/packages.el index 4816f3992..2b3f312fe 100644 --- a/modules/lang/php/packages.el +++ b/modules/lang/php/packages.el @@ -20,8 +20,5 @@ (when (modulep! :completion company) (package! company-phpactor :pin "6b5269ff82785a9bd1e648b2f91e5128353d5a67"))) -(when (modulep! :editor format) - (package! php-cs-fixer :pin "efe4368d891f1eec6311363cfd6be3e9eadb5e0a")) - ;; For building php-extras (package! async :pin "cff2bd0be3c78a2eb76717eed60302972fe9b8c5")