Skip to content

Add LiveResponseMustBeReturnedByLiveActionRule - #27

Merged
Kocal merged 1 commit into
mainfrom
feature/live-response-rule
Nov 8, 2026
Merged

Kocal merged 1 commit into
mainfrom
feature/live-response-rule

Conversation

@Kocal

@Kocal Kocal commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Returning a LiveResponse (added in symfony/ux-live-component 3.5) from the default action (__invoke() or the defaultAction of #[AsLiveComponent]) makes Symfony UX throw a LogicException at runtime. The rule reports it, and also reports a public method returning a LiveResponse without #[LiveAction] or #[LiveListener], since the browser cannot call it.

The tests use a LiveResponse stub because 3.5 requires PHP 8.4 while the CI runs PHP 8.2.

@Kocal
Kocal force-pushed the feature/live-response-rule branch 2 times, most recently from 6c0e1ab to 47a849f Compare November 8, 2026 06:42
Returning a `LiveResponse` (added in `symfony/ux-live-component` 3.5) from the default action (`__invoke()` or the `defaultAction` of `#[AsLiveComponent]`) makes Symfony UX throw a `LogicException` at runtime. The rule reports it, and also reports a public method returning a `LiveResponse` without `#[LiveAction]` or `#[LiveListener]`, since the browser cannot call it.

The tests use a `LiveResponse` stub because 3.5 requires PHP 8.4 while the CI runs PHP 8.2.
@Kocal
Kocal force-pushed the feature/live-response-rule branch from 47a849f to 095475c Compare November 8, 2026 07:01
@Kocal
Kocal merged commit e86c5b7 into main Nov 8, 2026
8 checks passed
@Kocal
Kocal deleted the feature/live-response-rule branch November 8, 2026 07:11
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