Repository navigation
Issue/626 Require Twig again - #630
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Closes #626.
What changed
composer.json:twig/twig^3.27moves fromsuggesttorequire. Twig is a rendering engine, and it was a required dependency of the framework until 3.0.3.stubs/Twig.stuband itsscanFilesentry inphpstan.neon.distare removed, so PHPStan analyzesTwigAdapteragainst the real Twig classes.RendererException::twigNotInstalled()and theclass_existscheck inTwigAdapterthat threw it are removed: they only existed while Twig was optional.RendererExceptionkeeps its inherited constructors (adapterNotSupported(),fileNotFound(),methodNotSupported()).markTestSkipped('… not installed')guards in the four Twig tests, and the test for the missing package, are removed.CHANGELOG.md: aChangedentry that reverses the 3.0.3 note (Prepare Quantum Framework for quantum-php org transition with PHP 8+ baseline #532).Why
Twig was moved to
suggestin 3.0.3 (#532) as a temporary measure: the vulnerable Twig releases were fixed only in versions that need PHP 8.1, and the framework still supported PHP 8.0. PHP 8.1 is the minimum now (#595),twig/twig:^3.27resolves on it (currently v3.30.0), andcomposer auditreports no advisories.Breaking changes
An application that pins Twig below 3.27 (the old requirement pinned it below 3.26 for PHP 7.4 and 8.0, #529) has to allow
^3.27on its nextcomposer update. Code that caught the exception fromRendererException::twigNotInstalled()no longer has anything to catch, because Twig is always installed. The changelog says so.Testing
TwigAdapterTest::testTwigAdapterRenderView,RendererFactoryTest::testRendererFactoryTwigAdapter,RendererTest::testRendererGetTwigAdapterandViewTest::testRenderViewWithTwigwere skipped (0 assertions) and now run and pass.upperandnumber_formatfilters, autoescaping of<script>and<b>, and a framework helper and a PHP function called from Twig) on PHP 8.1, and ran the Renderer and View tests on PHP 8.2 with all error levels on. No deprecations.Notes for reviewers
3.1.x, the maintenance branch of the 3.1 line.date,max,min,range,random), the PHP one wins. That is not new and is not changed here.