From cd7d66f13c45ecb1495badc373e5ff1898667af5 Mon Sep 17 00:00:00 2001 From: Martina Scholz Date: Thu, 21 Nov 2024 11:53:14 +0100 Subject: [PATCH 1/2] Add scripts for phpcs and csfixer in composer.json --- composer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b0689ad9e7298..7ea3016a07937 100644 --- a/composer.json +++ b/composer.json @@ -135,6 +135,8 @@ "scripts": { "post-install-cmd": [ "php build/update_fido_cache.php" - ] + ], + "phpcs": "./libraries/vendor/bin/phpcs --extensions=php -p --standard=ruleset.xml .", + "csfixer": "./libraries/vendor/bin/php-cs-fixer fix -vvv --dry-run --diff" } } From b40eff96ad1c1890d9ad2d06757cb02524d31c62 Mon Sep 17 00:00:00 2001 From: Martina Scholz Date: Thu, 21 Nov 2024 12:13:09 +0100 Subject: [PATCH 2/2] exclude directories `cache` and `logs` in php-cs-fixer configuration --- .php-cs-fixer.dist.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 23f0a3741954f..63534879322cc 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -55,6 +55,9 @@ ->notPath('/layouts/') ->notPath('/cassiopeia/') ->notPath('/atum/') + // Ingore cache and logs + ->notPath('/cache/') + ->notPath('/logs/') // Ignore psr12 scripts because they contain invalid syntax ->notPath('/psr12/') ->notName('github_rebase.php');