Skip to content

Add FromMethodMethodMustExistRule to validate template methods - #26

Merged
Kocal merged 1 commit into
mainfrom
feat/from-method-method-must-exist-rule
Nov 8, 2026
Merged

Kocal merged 1 commit into
mainfrom
feat/from-method-method-must-exist-rule

Conversation

@Kocal

@Kocal Kocal commented Nov 8, 2026

Copy link
Copy Markdown
Owner

When a component uses template: new FromMethod('getTemplate') (added in symfony/ux-twig-component 2.33), the rule checks that the method exists, is public and returns a string. Otherwise Symfony UX throws a LogicException at render time.

The dev dependencies on symfony/ux-twig-component and symfony/ux-live-component are bumped to ^2.33 so the fixtures can use FromMethod.

@Kocal
Kocal force-pushed the feat/from-method-method-must-exist-rule branch 2 times, most recently from 34f1c80 to b3be7ee Compare November 8, 2026 06:42
When a component uses `template: new FromMethod('getTemplate')` (added in `symfony/ux-twig-component` 2.33), the rule checks that the method exists, is public and returns a string. Otherwise Symfony UX throws a `LogicException` at render time.
@Kocal
Kocal force-pushed the feat/from-method-method-must-exist-rule branch from b3be7ee to e86a6d7 Compare November 8, 2026 07:01
@Kocal
Kocal merged commit 64777b1 into main Nov 8, 2026
8 checks passed
@Kocal
Kocal deleted the feat/from-method-method-must-exist-rule branch November 8, 2026 07:12
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.

1 participant