Skip to content

Conversation

alexislefebvre
Copy link
Contributor

Q A
Bug fix? no
New feature? no
Deprecations? no
Documentation? yes
Issues -
License MIT

I wanted to write {% props icon, type %} but it didn't work, because default values are mandatory for props.

So this PR make it explicit.

@carsonbot carsonbot added Documentation Improvements or additions to documentation Status: Needs Review Needs to be reviewed labels Oct 9, 2025
@carsonbot carsonbot changed the title TwigComponent: explain that default values are mandatory for props TwigComponent: explain that default values are mandatory for props Oct 9, 2025
@alexislefebvre alexislefebvre changed the title TwigComponent: explain that default values are mandatory for props [TwigComponent] explain that default values are mandatory for props Oct 9, 2025
@Kocal
Copy link
Member

Kocal commented Oct 10, 2025

This is not true, properties do not requires default values.
If you define a property without a default value and that you forgot to use it, the exception <prop> should be defined for component components/<component>.html.twig is raised.

@Kocal Kocal closed this Oct 10, 2025
@alexislefebvre
Copy link
Contributor Author

alexislefebvre commented Oct 10, 2025

This is not true, properties do not requires default values. If you define a property without a default value and that you forgot to use it, the exception <prop> should be defined for component components/<component>.html.twig is raised.

Thanks, this is a better way to say it. If I update this PR with this content, would you consider reopening and merging it?


Update: I’ll try to take this into account in #3132

@alexislefebvre alexislefebvre deleted the patch-2 branch October 10, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants