symfony/ux-twig-component
Twig components for Symfony
v3.4.0
21M downloads/mo
#541 most downloaded on Packagist
symfony/ux-twig-component
What this package is like to depend on
Last release 26 days ago
28 Jul 2026
Ships fairly regularly
a new release about every 3 weeks
Some releases are documented
notes for 25 of 61 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
61 releases · first in 2021
9 releases in the last 12 months
see the full history below
Release timeline
55 releases · Dec 2021 to Jul 2026Releases
latest 60 of 61-
v3.4.028 Jul 2026Release notes
Open source →Changelog (v3.3.0...v3.4.0)
- feature #3395 Support component tag names from expressions and component objects (@andreybotanic)
- minor #3735 Add sync-packages.php to normalize packages .gitattributes (@Kocal)
Release notes
Open source →- Add support for dynamic component names in the
{% component %}tag using a parenthesized expression, e.g.{% component (prefix ~ i) %}{% endcomponent %}
-
v3.3.005 Jul 2026 -
v3.2.011 Jun 2026Release notes
Open source →Changelog (v3.1.0...v3.2.0)
- feature #3602 Allow standalone usage with any PSR-11 container (@guillaume-sainthillier)
- feature #3600 Expose pre/embedded render methods on
ComponentRendererInterface(@treztreiz)
Release notes
Open source →- Add
ComponentRendererInterface::preCreateForRender(),ComponentRendererInterface::startEmbeddedComponentRender(), andComponentRendererInterface::finishEmbeddedComponentRender()methods - Allow using
ComponentFactoryandComponentRuntimewith any PSR-11 container, makingsymfony/dependency-injectionoptional for standalone usage
-
v3.1.029 May 2026Release notes
Open source →Changelog (v3.0.0...v3.1.0)
- feature #3455 Use
twig.safe_classtag and movesetLexertoTwigComponentPass(@GromNaN) - bug #3500 Include attribute name in null value error message (@IndraGunawan)
- feature #3512 Add
provide()andinject()Twig functions (@Kocal)
Release notes
Open source →- Add
provide()andinject()Twig functions to share state from a parent component down to deeply-nested descendants without prop drilling - Include the attribute name in the error message thrown when an attribute value is
null
- feature #3455 Use
-
v3.0.009 Apr 2026Release notes
Open source →Changelog (v2.34.0...v3.0.0)
- feature #3453 Update minimum required Symfony version to 7.4 (@Kocal)
- feature #3450 Upgrade minimum required PHP version to 8.4 (@Kocal)
- feature #3407 Allow Symfony UX 3.x packages (@Kocal)
- feature #3408 Add support for
AttributeValueInterfacefromtwig/html-extra:^3.24.0inComponentAttributes(@Kocal) - bug #3398 Post-merge fixes for 3.x (@Kocal)
- bug #3191 Fix 2.x -> 3.x merge (@Kocal)
- bug #3187 Add phpunit.dist.xml in .gitattributes (@Kocal)
- bug #3182 Drop Symfony PHPUnit Bridge in favor of PHPUnit >= 11.0 (@Kocal)
- bug #3105 Remove dev-dependency on WebpackEncoreBundle (@Kocal)
- feature #3040 Remove deprecations (@smnandre)
- feature #2998 Upgrade minimum required PHP version to 8.2 (@Kocal)
- feature #2996 Update minimum required Symfony version to ^6.4 (@Kocal)
Release notes
Open source →- Minimum required Symfony version is now 7.4
- Minimum required PHP version is now 8.4
- The configuration
twig_component.defaultscould not be nullable anymore - Remove method
PreCreateForRenderEvent::getProps()in favor ofPreCreateForRenderEvent::getInputProps() - Remove
cvaTwig function in favor ofhtml_cvaTwig function fromtwig/html-extra - Passing
nullas an attribute value when usingComponentAttributes(orattributesTwig variable) will now throw an exception, useremove()instead - Remove method
ComponentAttributes::add(), use{{ attributes.defaults(stimulus_controller('...')) }}instead - The
ComponentTemplateFinderdoes not acceptTwig\Environmentas first argument anymore, pass aLoaderInterfaceinstead - The
ComponentTemplateFinderdoes not accept a nullabledirectoryargument anymore, pass a string instead - Remove old compatibility layer with deprecated
StimulusTwigExtensionfrom WebpackEncoreBundle ^1.0, use StimulusBundle instead
-
v2.36.003 Apr 2026 -
v2.35.0no date -
v2.34.015 Mar 2026 -
v2.33.0no dateRelease notes
Open source →Changelog (v2.32.0...v2.33.0)
- bug #3372 Fix reflection issues for private properties from trait and parent class (@kachnitel)
- bug #3381 Fix profiling loaded in production (@VincentChataignier)
- feature #3361 Allow components use dynamically templates (@xDeSwa)
- bug #3341 Minor performance improvement by caching
PropertyAccessor::isWritable()calls (@Kocal) - bug #3340 Minor performance improvements when using
{ props }(@Kocal) - feature #3295 Add support for anonymous component name resolution in other bundle (@Phil23)
-
v2.32.025 Dec 2025Nothing published for this version
-
v2.31.017 Oct 2025Nothing published for this version
-
v2.30.027 Aug 2025Nothing published for this version
-
v2.29.214 Aug 2025Nothing published for this version
-
v2.29.005 Aug 2025 -
v2.28.229 Jul 2025Nothing published for this version
-
v2.28.027 Jun 2025Nothing published for this version
-
v2.27.021 Jun 2025Nothing published for this version
-
v2.26.026 May 2025Nothing published for this version
-
v2.25.220 May 2025Release notes
Open source →- Fix
ComponentAttributesrendering when usingStimulusAttributesas default attributes
- Fix
-
v2.25.119 May 2025Release notes
Open source →- [SECURITY]
ComponentAttributesnow requires aTwig\Runtime\EscaperRuntimeinstance as second argument - Remove
HtmlAttributeEscaperInterface,TwigHtmlAttributeEscaperandComponentAttributesFactory
- [SECURITY]
-
v2.25.017 May 2025Release notes
Open source →- [SECURITY] Make
ComponentAttributesresponsible for attribute escaping ensuring consistent and secure HTML output across all rendering contexts - Deprecate not passing an
HtmlAttributeEscaperInterfaceto theComponentAttributesconstructor
- [SECURITY] Make
-
v2.24.021 Mar 2025Nothing published for this version
-
v2.23.025 Jan 2025Nothing published for this version
-
v2.22.107 Dec 2024Nothing published for this version
-
v2.22.023 Nov 2024Nothing published for this version
-
v2.21.005 Oct 2024Nothing published for this version
-
v2.20.024 Sep 2024Release notes
Open source →- Add Anonymous Component support for 3rd-party bundles #2019
- Deprecate
cvaTwig function in favor ofhtml_cvafromtwig/html-extra#2144
-
v2.19.213 Aug 2024Nothing published for this version
-
v2.19.001 Aug 2024Nothing published for this version
-
v2.18.111 Jun 2024Nothing published for this version
-
v2.18.006 Jun 2024Nothing published for this version
-
v2.17.019 Apr 2024 -
v2.16.029 Feb 2024Release notes
Open source →- Introduce CVA to style TwigComponent #1416
- Drop Twig 2 support #1436
- Fix full context is stored in profiler #1552
- Add CVA (Class variant authority) integration #1416
-
v2.15.020 Feb 2024Release notes
Open source →- Add the ability to render specific attributes from the
attributesvariable #1442 - Restrict Twig 3.9 for now #1486
- Build reproducible TemplateMap to fix possible post-deploy breakage #1497
- Add the ability to render specific attributes from the
-
v2.14.207 Feb 2024Nothing published for this version
-
v2.14.030 Jan 2024Release notes
Open source →- Make
ComponentAttributestraversable/countable - Fixed lexing some
{# twig comments #}with HTML Twig syntax - Fix various usages of deprecated Twig code
- Make
-
v2.13.301 Dec 2023Nothing published for this version
-
v2.13.108 Nov 2023Nothing published for this version
-
v2.13.007 Nov 2023Release notes
Open source →- [BC BREAK] Add component metadata to
PreMountEventandPostMountEvent - Added configuration to separate your components into different "namespaces"
- Add
outerScopevariable reach variables from the parent template of an "embedded" component. - Deprecate calling
ComponentTemplateFinderconstructor withoutdirectoryargument. - Add profiler integration:
TwigComponentDataCollectorand debug toolbar templates - Add search feature in
debug:twig-componentcommand. - Fix inconsistencies with how
{% component %}/<twig:component>syntaxes are rendered vscomponent():PostRenderEventis now dispatched & the template resolution happens at runtime. - Fix priority of passed in props vs default props with anonymous components.
- Add Symfony 7 support.
- TwigPreLexer: improve performance.
- Fix twig:lint bug with anonymous component tag.
- [BC BREAK] Add component metadata to
-
v2.12.022 Sep 2023Release notes
Open source →- Added a
debug:twig-componentcommand. - Fixed bad exception when the error comes from a Twig template.
- Fixed deprecation with
TemplateCacheWarmerreturn type.
- Added a
-
v2.11.207 Sep 2023Nothing published for this version
-
v2.11.105 Sep 2023Nothing published for this version
-
v2.11.024 Aug 2023Release notes
Open source →- Support ...spread operator with html syntax (requires Twig 3.7.0 or higher)
- Add support for anonymous Twig components.
- Add
RenderedComponent::crawler()andtoString()methods. - Allow a block outside a Twig component to be available inside via
outerBlocks. - Fix
<twig:component>syntax where an attribute is set to an empty value. - Add component debug command for TwigComponent and LiveComponent.
-
v2.10.028 Jun 2023Nothing published for this version
-
v2.9.207 Oct 2024Nothing published for this version
-
v2.9.130 May 2023Nothing published for this version
-
v2.9.024 May 2023Release notes
Open source →- The
ComponentAttributes::defaults()method now accepts any iterable argument. TheComponentAttributes::add()method has been deprecated. To add a Stimulus controller to the attributes, use{{ attributes.defaults(stimulus_controller('...')) }}.
- The
-
v2.8.112 May 2023Nothing published for this version
-
v2.8.001 May 2023Release notes
Open source →- Add new HTML syntax for rendering components:
<twig:ComponentName> trueattribute values now render just the attribute name,falseexcludes it entirely.- Add helpers for testing components.
- The first argument to
AsTwigComponentis now optional and defaults to the class name. - Allow passing a FQCN to
ComponentFactorymethods.
- Add new HTML syntax for rendering components:
-
v2.7.119 Jan 2023Nothing published for this version
-
v2.7.0no date -
v2.6.122 Nov 2022Nothing published for this version
-
v2.6.0no dateNothing published for this version
-
v2.5.007 Nov 2022Nothing published for this version
-
v2.4.017 Jun 2022Nothing published for this version
-
v2.3.0no dateNothing published for this version
-
v2.2.031 May 2022Nothing published for this version
-
v2.1.114 Mar 2022Nothing published for this version
-
v2.1.022 Feb 2022Nothing published for this version
-
v2.0.103 Dec 2021Nothing published for this version