Skip to content

Update dependencies and clear composer warnings - #400

Merged
luispabon merged 1 commit into
masterfrom
dependency-updates
Nov 24, 2026
Merged

luispabon merged 1 commit into
masterfrom
dependency-updates

Conversation

@luispabon

Copy link
Copy Markdown
Contributor

What changed

  • Loosened twig/twig and twig/extra-bundle from ^3.23 <3.29 to ^3.23.
  • Refreshed composer.lock with a full composer update (56 packages updated).
  • Added name/description to composer.json so composer validate --strict passes.
  • Set level: 9 in phpstan.neon and fixed the two test findings that exposed.

Why the twig cap was removed

The <3.29 cap was added in d93bb8e as a workaround: twig 3.29 made TemplateWrapper::unwrap() require an Environment argument, which twig-bridge 8.0.15 did not pass. Twig 3.30 restored the optional argument, so the cap is no longer needed for compatibility.

The cap then became a hard blocker: twig 3.31.1 (released 2026-11-24) is the first 3.x release clear of the 26 security advisories published that day, and composer refuses to resolve any capped twig version because of them. With the cap in place, composer update failed outright with 26 advisory IDs.

Warning cleanup

  • symfony/flex 2.12.0 stops the PHP 8.5 deprecation notice (Using null as an array offset) that 2.11.0 printed on every composer command.
  • composer validate --strict now passes with no schema errors.
  • vendor/bin/phpstan analyse without -l now runs the configured paths instead of reporting "No rules detected". The two errors this surfaced were a redundant assertContainsOnlyInstancesOf() (the array is already typed) and Symfony's intentional -1 trusted-header reset sentinel, which is now explicitly ignored with a reason.

Verification

  • composer update: resolves, "No security vulnerability advisories found"
  • composer validate --strict: valid
  • make static-analysis and bare vendor/bin/phpstan analyse: no errors
  • vendor/bin/phpunit --no-coverage: 138 tests, 593 assertions, OK
  • bin/console lint:yaml config, lint:twig templates, lint:container, cache:clear: OK

Known leftover

symfony/twig-bridge 8.1.10 (latest) still calls TemplateWrapper::unwrap() with no argument, so twig 3.30+ triggers a deprecation from vendor code. Nothing to fix in this repo until a patched twig-bridge release lands. Pinning twig below 3.30 is not an option because of the advisories above.

Loosen twig/twig and twig/extra-bundle from "^3.23 <3.29" to "^3.23".
The upper bound was a workaround for twig 3.29 requiring an Environment
argument in TemplateWrapper::unwrap(); twig 3.30 restored the optional
argument, so the cap is no longer needed.

The cap also blocked every security fix: twig 3.31.1 is the first 3.x
release clear of the 26 advisories published on 2026-11-24, and composer
could not resolve a lock file at all while the cap was in place.

Refresh the lock file (56 packages updated, theseer/tokenizer removed),
which also drops the PHP 8.5 "Using null as an array offset" deprecation
notice that symfony/flex 2.11 printed on every composer command.

Add name and description so composer validate --strict passes, and set
level 9 in phpstan.neon so a plain "phpstan analyse" uses the configured
paths instead of reporting "No rules detected". Fix the two test findings
that exposes.
@luispabon
luispabon merged commit 76dd4d3 into master Nov 24, 2026
4 checks passed
@luispabon
luispabon deleted the dependency-updates branch November 24, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant