Skip to content

Conversation

@Kocal
Copy link
Member

@Kocal Kocal commented Feb 2, 2026

Q A
Bug fix? yes
New feature? no
Deprecations? no
Documentation? yes
Issues Fix #3329
License MIT

@Kocal Kocal self-assigned this Feb 2, 2026
@carsonbot carsonbot added Bug Bug Fix Documentation Improvements or additions to documentation TwigComponent Status: Needs Review Needs to be reviewed labels Feb 2, 2026
@Kocal Kocal requested a review from Copilot February 2, 2026 22:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR documents the higher-order components (component wrappers) feature in TwigComponent, which allows creating component variants that wrap other components while adding default attributes.

Changes:

  • Added documentation section explaining higher-order components with code examples
  • Added comprehensive test coverage for higher-order component functionality
  • Created test fixtures demonstrating button component wrapping patterns

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/TwigComponent/doc/index.rst Added documentation section with examples of creating and using higher-order components
src/TwigComponent/tests/Integration/ComponentExtensionTest.php Added test method verifying attribute merging behavior in higher-order components
src/TwigComponent/tests/Fixtures/templates/higher_order_component.html.twig Created test template demonstrating various higher-order component usage patterns
src/TwigComponent/tests/Fixtures/templates/components/SimpleButton/Primary.html.twig Created Primary button variant component that wraps SimpleButton
src/TwigComponent/tests/Fixtures/templates/components/SimpleButton.html.twig Created base SimpleButton component with default attributes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Kocal Kocal merged commit 64b85ba into symfony:2.x Feb 3, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Bug Fix Documentation Improvements or additions to documentation Status: Needs Review Needs to be reviewed TwigComponent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TwigComponent] "High Order Component" and attributes

2 participants