Issue/532 dependency security followup#556
Conversation
📝 WalkthroughWalkthroughThis PR makes Twig an optional renderer dependency with a runtime existence check and a new actionable exception, adds a Twig PHPStan stub, upgrades several composer dependencies, widens Logger report() message typing to accept Stringable, and updates related tests, changelog, and README documentation. ChangesOptional Twig Renderer Support
Estimated code review effort: 3 (Moderate) | ~25 minutes Stringable Message Support in Logger
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant TwigAdapter
participant RendererException
Caller->>TwigAdapter: new TwigAdapter(configs)
TwigAdapter->>TwigAdapter: class_exists(Twig\Environment)
alt Twig not installed
TwigAdapter->>RendererException: twigNotInstalled()
RendererException-->>Caller: throw RendererException with install guidance
else Twig installed
TwigAdapter-->>Caller: instance initialized with FilesystemLoader
end
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@composer.json`:
- Around line 42-52: The dependency entry for zircote/swagger-php is
incompatible with the project’s current PHP baseline in composer.json. Update
the composer requirements by either lowering the swagger-php version to a
release compatible with PHP 8.0 or raising the project PHP constraint to 8.2+;
use the zircote/swagger-php package entry and the root PHP requirement to make
the change consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8545eb0a-871a-42f7-a397-359a4df61798
📒 Files selected for processing (14)
CHANGELOG.mdREADME.mdcomposer.jsonphpstan.neon.distsrc/Logger/Adapters/MessageAdapter.phpsrc/Logger/Contracts/ReportableInterface.phpsrc/Logger/Traits/LoggerTrait.phpsrc/Renderer/Adapters/TwigAdapter.phpsrc/Renderer/Exceptions/RendererException.phpstubs/Twig.stubtests/Unit/Renderer/Adapters/TwigAdapterTest.phptests/Unit/Renderer/Factories/RendererFactoryTest.phptests/Unit/Renderer/RendererTest.phptests/Unit/View/ViewTest.php
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests