fix: exclude auto-generated reference.php from pre-commit CS-fixer

This commit is contained in:
2026-07-07 08:01:57 +02:00
parent cb577d60d3
commit 12d40b2602
2 changed files with 2 additions and 4 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ setopt ERR_EXIT PIPE_FAIL NOUNSET
# Collect staged PHP and Twig files
STAGED_PHP=()
while IFS= read -r file; do
[[ -n "$file" ]] && STAGED_PHP+=("$file")
[[ -n "$file" && "$file" != "config/reference.php" ]] && STAGED_PHP+=("$file")
done < <(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.php$' || true)
STAGED_TWIG=()
@@ -32,7 +32,7 @@ if [[ ${#STAGED_PHP[@]} -gt 0 ]]; then
git add "${STAGED_PHP[@]}"
echo " → PHP-CS-Fixer"
"${DOCKER_CMD[@]}" vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php "${STAGED_PHP[@]}"
"${DOCKER_CMD[@]}" vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --path-mode=intersection "${STAGED_PHP[@]}"
git add "${STAGED_PHP[@]}"
echo " → PHPStan"
-2
View File
@@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
// This file is auto-generated and is for apps only. Bundles SHOULD NOT rely on its content.
namespace Symfony\Component\DependencyInjection\Loader\Configurator;