diff --git a/docs/platforms/php/guides/symfony/index.mdx b/docs/platforms/php/guides/symfony/index.mdx index f7dc760bd5240..75288b2eb3d6b 100644 --- a/docs/platforms/php/guides/symfony/index.mdx +++ b/docs/platforms/php/guides/symfony/index.mdx @@ -44,23 +44,15 @@ namespace App\Controller; use Psr\Log\LoggerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class SentryTestController extends AbstractController { - /** - * @var LoggerInterface - */ - private $logger; - - public function __construct(LoggerInterface $logger) + public function __construct(private LoggerInterface $logger) { - $this->logger = $logger; } - /** - * @Route(name="sentry_test", path="/_sentry-test") - */ + #[Route('/_sentry-test', name: 'sentry_test')] public function testLog() { // the following code will test if monolog integration logs to sentry