Skip to content

Commit fe22db5

Browse files
committed
Merge branch '7.4' into 8.0
* 7.4: Fix example in event_dispatcher.rst
2 parents b97db48 + 80fa854 commit fe22db5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

event_dispatcher.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ event subscribers, you can learn more about :ref:`how to use them <events-subscr
529529
namespace App\EventSubscriber;
530530

531531
use App\Controller\TokenAuthenticatedController;
532+
use Symfony\Component\DependencyInjection\Attribute\Autowire;
532533
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
533534
use Symfony\Component\HttpKernel\Event\ControllerEvent;
534535
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
@@ -537,6 +538,7 @@ event subscribers, you can learn more about :ref:`how to use them <events-subscr
537538
class TokenSubscriber implements EventSubscriberInterface
538539
{
539540
public function __construct(
541+
#[Autowire(param: 'tokens')]
540542
private array $tokens
541543
) {
542544
}

0 commit comments

Comments
 (0)