Skip to content

Merge 3.1.x into master - #631

Merged
armanist merged 4 commits into
masterfrom
3.1.x
Oct 28, 2026
Merged

armanist merged 4 commits into
masterfrom
3.1.x

Conversation

@armanist

@armanist armanist commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #626.

Summary by CodeRabbit

  • Breaking Changes
    • Twig is now a required dependency; applications using Twig rendering must install Twig ^3.27.
  • New Features
    • Newly generated DemoWeb and Toolkit templates use same-origin checks for referrer redirects, helping prevent redirects to external sites.
    • Existing generated modules are unchanged.

armanist and others added 4 commits October 28, 2026 19:34
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>
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: affa941a-4ceb-4b44-99fd-ed55cf75ede8
Commits

Reviewing files that changed from the base of the PR and between 328c7f6 and 6f4ea1e.

Files selected for processing: 10
  • CHANGELOG.md
  • composer.json
  • phpstan.neon.dist
  • src/Renderer/Adapters/TwigAdapter.php
  • src/Renderer/Exceptions/RendererException.php
  • stubs/Twig.stub
  • tests/Unit/Renderer/Adapters/TwigAdapterTest.php
  • tests/Unit/Renderer/Factories/RendererFactoryTest.php
  • tests/Unit/Renderer/RendererTest.php
  • tests/Unit/View/ViewTest.php
Files with no reviewable changes: 8
  • tests/Unit/Renderer/Factories/RendererFactoryTest.php
  • tests/Unit/Renderer/RendererTest.php
  • phpstan.neon.dist
  • tests/Unit/View/ViewTest.php
  • src/Renderer/Exceptions/RendererException.php
  • src/Renderer/Adapters/TwigAdapter.php
  • stubs/Twig.stub
  • tests/Unit/Renderer/Adapters/TwigAdapterTest.php

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

Twig is now a required dependency. The adapter no longer checks for its availability, and Twig tests no longer skip when it is absent. The changelog also records that generated DemoWeb and Toolkit templates use back() for same-origin-checked referrer redirects; previously generated modules are unchanged.

Changes: Twig Rendering

Layer / File(s) Summary
Twig dependency and analysis setup
composer.json, stubs/Twig.stub, phpstan.neon.dist, CHANGELOG.md
Composer requires twig/twig ^3.27 instead of suggesting it. The Twig stub and its PHPStan scan entry are removed. The changelog records the dependency change.
Remove missing-Twig handling
src/Renderer/Adapters/TwigAdapter.php, src/Renderer/Exceptions/RendererException.php
The adapter no longer checks whether Twig is installed. RendererException::twigNotInstalled() is removed.
Run Twig tests without skips
tests/Unit/Renderer/Adapters/TwigAdapterTest.php, tests/Unit/Renderer/Factories/RendererFactoryTest.php, tests/Unit/Renderer/RendererTest.php, tests/Unit/View/ViewTest.php
Twig tests proceed without availability checks or skip paths. The test for the missing-Twig exception is removed.

Priority: Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Suggested reviewers: charoyan88, andrey-smaelov, grigoryanmartin20

Merge Risk: Minimal · up to 6f4ea

No concrete merge-blocking defect is established; the dependency, analysis, and Twig test paths are consistent with the repository’s supported setup.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive The implementation matches issue #626: twig/twig:^3.27 moved to require, the Twig stub and PHPStan entry were removed, missing-Twig guards and exception code were removed, four test skips were rem… Provide reviewable CI or test results for the required commands and PHP 8.1–8.3 matrix, including evidence that the four Twig tests run and pass.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately identifies the primary change: merging the 3.1.x branch into master. It is concise and specific.
Out of Scope Changes check Passed The reviewed changes support issue #626. They update the dependency and PHPStan configuration, remove obsolete missing-Twig handling, update the affected tests, and add the required changelog entry. N…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Out of Scope Changes check

Explanation

The reviewed changes support issue #626. They update the dependency and PHPStan configuration, remove obsolete missing-Twig handling, update the affected tests, and add the required changelog entry. No unrelated change is established by the reviewed diff.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Full details: Linked Issues check

Explanation

The implementation matches issue #626: twig/twig:^3.27 moved to require, the Twig stub and PHPStan entry were removed, missing-Twig guards and exception code were removed, four test skips were removed, and the changelog was updated. The available evidence does not show that the four Twig tests and composer phpstan, composer test, composer cs:check, and composer rector:check pass on PHP 8.1, 8.2, and 8.3.

Resolution

Provide reviewable CI or test results for the required commands and PHP 8.1–8.3 matrix, including evidence that the four Twig tests run and pass.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@armanist
armanist merged commit 5dc711a into master Oct 28, 2026
10 checks passed
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.

Install Twig for the test suite again and run the Twig tests

1 participant