From 637bee69617369e786ecff3a96f2c6b1a5c6e06c Mon Sep 17 00:00:00 2001 From: Devin Haska <2636402+wonderfulfrog@users.noreply.github.com> Date: Wed, 12 Mar 2025 14:30:48 -0700 Subject: [PATCH] fix: php_cs_fixer on php versions >8.3 --- lua/plugins/formatting.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lua/plugins/formatting.lua b/lua/plugins/formatting.lua index aa21a36..f0ade9a 100644 --- a/lua/plugins/formatting.lua +++ b/lua/plugins/formatting.lua @@ -13,7 +13,7 @@ return { javascriptreact = { "prettierd" }, json = { "prettierd" }, jsonc = { "prettierd" }, - php = { "pint", "php_cs_fixer", stop_after_first = true }, + php = { "php_cs_fixer", stop_after_first = true }, toml = { "taplo" }, typescript = { "prettierd" }, typescriptreact = { "prettierd" }, @@ -36,6 +36,9 @@ return { end, }, php_cs_fixer = { + env = { + PHP_CS_FIXER_IGNORE_ENV = "1", + }, args = function() local CONFIG_PATH = os.getenv("HOME") .. "/.config/php-cs-fixer/php-cs-fixer.php" return { @@ -46,6 +49,16 @@ return { } end, }, + -- pint = { + -- args = function() + -- local CONFIG_PATH = os.getenv("HOME") .. "/.config/pint/pint.json" + -- return { + -- "--config", + -- CONFIG_PATH, + -- "$FILENAME", + -- } + -- end, + -- }, }, }, },