Skip to content

chore(3.x): release 3.0.0 - #39

Merged
roxblnfk merged 2 commits into
3.xfrom
release-please--branches--3.x--components--spiral/twig-bridge
Dec 6, 2026
Merged

roxblnfk merged 2 commits into
3.xfrom
release-please--branches--3.x--components--spiral/twig-bridge

Conversation

@github-actions

@github-actions github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

🤖 I have created a release beep boop

3.0.0 (2026-12-06)

⚠ BREAKING CHANGES

  • require the Spiral components instead of spiral/framework (#54)
  • the package no longer installs spiral/framework. An application on the framework that does not list it in its own require adds it (composer require spiral/framework:~3.16 --no-update) before updating, otherwise the update removes it.
  • TwigEngine::getEnvironment($context) returns the environment of that context only; set up Twig with a configurator or TwigEngine::configure() instead.
  • make all classes final and analyse with Psalm at level 1 (#42)
  • exception: ConfigException and SyntaxException are final. TwigEngine::__construct() takes ?Twig\Cache\CacheInterface $cache instead of CacheInterface|bool|null; TwigEngine::withLoader() returns self, TwigEngine::get() returns TwigView, and the protected EXTENSION constant and normalize() method are private. TwigConfig::getExtensions() and getProcessors() are documented as list<Autowire|object>; TwigConfig throws ConfigException for a non-array options, extensions or processors entry and for an empty class name, and the bootloader throws ConfigException for an extension that is not a Twig ExtensionInterface or a processor that is not a ProcessorInterface.
  • require Twig 3.31.1 and Spiral 3.16 (#41)
  • with the Spiral view cache disabled, a Twig cache option set in the application is now applied, and compiled templates are written there. Remove the option to keep compiling in memory.
  • the Twig autoescape option now defaults to 'name': *.js.twig/*.json.twig get JavaScript escaping, *.css.twig CSS escaping, *.txt.twig none. Set autoescape to 'html' to restore the previous behaviour.
  • TwigView::render() and renderBlock() throw Spiral\Views\Exception\RenderException instead of Twig\Error\RuntimeError, SyntaxError or LoaderError; the original Twig error is available through getPrevious().

Features

  • configure every Twig environment through configurators and hooks (#53) (9d72ebe), closes #51
  • escape templates by file extension by default (#37) (bc5af8f)
  • provide the Twig environment as a container service (#57) (17056a1), closes #10
  • require Twig 3.31.1 and Spiral 3.16 (#41) (4c2ae9a)
  • respect the Twig cache option when the view cache is disabled (#40) (e98db38)
  • ship the spiral-twig-bridge agent skill (#56) (0f9aded)

Bug Fixes

  • apply hooks to environments created while they run and reject self-recursion (#55) (a50fb95)
  • exception: build SyntaxException from a SyntaxError without a source context (95deee9)
  • fail loudly when a Twig extension or configurator needs the views while the engine is created (#60) (040f90a), closes #58 #61
  • keep hook and recursion state per fiber (a50fb95)
  • keep the view context in templates loaded while rendering (#52) (51bfd1c), closes #51
  • wrap errors raised while rendering into RenderException (#38) (afd63e6)

Documentation

  • add the 3.0 upgrade guide (#47) (766bf0f)
  • correct when an own Twig\Environment binding survives TwigBootloader (ccea16a)
  • sync the agent skill with the Spiral components, hooks and the environment service (#59) (ccea16a)

Code Refactoring

  • make all classes final and analyse with Psalm at level 1 (#42) (95deee9)

Build System

  • require the Spiral components instead of spiral/framework (#54) (f6364b4)

Continuous Integration

  • check the components alone with a dependency analyser, Psalm and a smoke render (f6364b4)

This PR was generated with Release Please. See documentation.

@github-actions
github-actions Bot requested a review from a team December 5, 2026 21:39
@github-actions
github-actions Bot force-pushed the release-please--branches--3.x--components--spiral/twig-bridge branch 3 times, most recently from b6643ea to 2243270 Compare December 5, 2026 21:49
@codecov

codecov Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.63%. Comparing base (c6d3805) to head (9b15afa).

Additional details and impacted files
@@           Coverage Diff           @@
##              3.x      #39   +/-   ##
=======================================
  Coverage   99.63%   99.63%           
=======================================
  Files          12       12           
  Lines         275      275           
=======================================
  Hits          274      274           
  Misses          1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
github-actions Bot force-pushed the release-please--branches--3.x--components--spiral/twig-bridge branch 10 times, most recently from ce26a53 to 0e1d2b3 Compare December 6, 2026 14:42
@github-actions
github-actions Bot force-pushed the release-please--branches--3.x--components--spiral/twig-bridge branch from 0434100 to feb2aca Compare December 6, 2026 14:51
The Spiral Framework requirement and the root-level Psalm from #41 were replaced by #54 and #46 before the release.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk merged commit 95239c4 into 3.x Dec 6, 2026
23 checks passed
@roxblnfk
roxblnfk deleted the release-please--branches--3.x--components--spiral/twig-bridge branch December 6, 2026 15:15
@github-actions

github-actions Bot commented Dec 6, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Created releases:

🌻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant