state; } } /** * Test Component with private action (should fail validation) */ final class PrivateActionComponent implements LiveComponentContract { public function __construct( public ComponentId $id, public CounterState $state ) { } public function getRenderData(): ComponentRenderData { return new ComponentRenderData(templatePath: 'test', data: []); } #[Action] private function privateAction(): CounterState { return $this->state; } } /** * Test Component with static action (should fail validation) */ final class StaticActionComponent implements LiveComponentContract { public function __construct( public ComponentId $id, public CounterState $state ) { } public function getRenderData(): ComponentRenderData { return new ComponentRenderData(templatePath: 'test', data: []); } #[Action] public static function staticAction(): CounterState { return CounterState::empty(); } } /** * Test Component with primitive return type (should fail validation) */ final class PrimitiveReturnTypeComponent implements LiveComponentContract { public function __construct( public ComponentId $id, public CounterState $state ) { } public function getRenderData(): ComponentRenderData { return new ComponentRenderData(templatePath: 'test', data: []); } #[Action] public function intAction(): int { return 42; } } /** * Test Component with array return type (should fail validation) */ final class ArrayReturnTypeComponent implements LiveComponentContract { public function __construct( public ComponentId $id, public CounterState $state ) { } public function getRenderData(): ComponentRenderData { return new ComponentRenderData(templatePath: 'test', data: []); } #[Action] public function arrayAction(): array { return []; } }