<?php declare(strict_types=1); #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] final class Route { public function __construct(public ?string $serializationGroups = null) {} } #[Route( name: 'show_book_with_serialization_groups', path: '/book/{id}', controller: 'app.controller.book:showAction', serializationGroups: ['sylius'] )] final class TestRoute {} $testRoute = new TestRoute; $reflection = new ReflectionObject($testRoute); $routeAttributes = $reflection->getAttributes(Route::class); var_dump($routeAttributes[0]->getArguments());
You have javascript disabled. You will not be able to edit any code.