Repository navigation
Upgrade Twig CS Fixer to v4 and preserve operator spacing checks - #38
Merged
Merged
Conversation
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adapts #31 at
23912b3aba0731e2d08fe80ddb005344b3262440.Prepared a replacement commit containing the Twig CS Fixer 4.1.1 update and its lockfile, plus the two new operator spacing rules required to preserve existing lint coverage. The unadapted PR silently accepts malformed ternary and unary spacing. All requested local dependency, PHP and frontend checks passed; no application runtime, image, browser asset or workflow changes were needed. Human merge is required.
Agent-assessed risk: Low. This development-tool update preserves the existing spacing policy, with a focused regression check and passing application checks; production dependencies and runtime code are unchanged.
Evidence (8 items)
git diff ee5e8d0f5b218418a745c507e89c4219f601a0d5...refs/artidezi/inputs/source-pr— Merge base equals the recorded target base. The source changes only app/composer.json and app/composer.lock, upgrading vincentlanglet/twig-cs-fixer from 3.14.0 to 4.1.1; no target-only changes require reconciliation../bin/composer install --no-interaction --prefer-dist; ./bin/composer validate --strict; ./bin/composer audit --locked— All passed using the repository helper. Composer manifest is valid and no security advisories were found. Locked Twig 3.28.0 satisfies the fixer’s new ^3.15 requirement; its Symfony constraints support the existing 8.1 components.docker build --iidfile /tmp/artidezi-php-image.id etc/docker/php; docker run --rm --network none --user "$(id -u):$(id -g)" --mount "type=bind,src=$PWD,dst=/code" --workdir /code/app --entrypoint /bin/sh "$(cat /tmp/artidezi-php-image.id)" -ec 'vendor/bin/phpstan analyse -c phpstan.neon && vendor/bin/php-cs-fixer check --config=.php-cs-fixer.dist.php && vendor/bin/twig-cs-fixer lint --config=.twig-cs-fixer.dist.php'— Build succeeded using cached layers. All checks passed: PHPStan analysed 145 files, PHP CS Fixer checked 146 files, and Twig lint checked 38 templates with no errors. Runtime probe reported PHP 8.5.12 and MongoDB driver 2.5.5, satisfying locked mongodb/mongodb 2.5.0’s ^2.5 driver requirement. PHP CS Fixer emitted an informational warning that the runtime is newer than composer.json’s PHP 8.4 minimum. No live database or monitoring stack was started.vendor/bin/twig-cs-fixer lint --no-cache --config=<original-or-adapted-config> <isolated-fixture>; vendor/bin/twig-cs-fixer fix --no-cache --config=<adapted-config> <isolated-fixture>— Executed in the built PHP image with isolated temporary fixtures containing {{ enabled?1:0 }} and {{ not enabled }}. The original PR ruleset passed incorrectly; the adapted ruleset reported five spacing errors. Fixing and subsequent lint passed. Temporary fixtures were removed and were not committed.just js-analyze js-build; ./bin/node /bin/sh -c 'cd /app/src && npm audit'— ESLint, TypeScript checking, frontend image/asset build and npm audit all passed; npm reported zero vulnerabilities. Ignored generated assets were not committed. Browser behavior was not exercised because the update changes only a PHP development tool and lint configuration.git diff --check; git status --porcelain=v1— Whitespace validation passed before committing. Final working tree is clean. Replacement commit includes all original PR changes and the compatibility fix; no workflow files changed.Provided source CI snapshot for 23912b3aba0731e2d08fe80ddb005344b3262440— The supplied snapshot reports successful frontend and php checks for the original source head. This is supporting point-in-time evidence, not a fresh controller gate for the replacement commit.Human review and merge are required.