Listener/GroupSecurityIdentitySubscriber.php
public function addGroupSecurityIdentities(AddSecurityIdentityEvent $event): void
    {
        try {
            $sids = $event->getSecurityIdentities();
            $sids = IdentityUtils::merge(
                $sids,
                GroupSecurityIdentity::fromToken($event->getToken())
            );
            $event->setSecurityIdentities($sids);
        } catch (\InvalidArgumentException $e) {
            // ignore
        }
    }
public function addGroupSecurityIdentities(AddSecurityIdentityEvent $event): void
    {
        try {
            $sids = $event->getSecurityIdentities();
            $sids = IdentityUtils::merge(
                $sids,
                GroupSecurityIdentity::fromToken($event->getToken())
            );
            $event->setSecurityIdentities($sids);
        } catch (\InvalidArgumentException $e) {
            // ignore
        }
    }
public function addGroupSecurityIdentities ( AddSecurityIdentityEvent $ event ) : void { try { $ sids = $ event -> getSecurityIdentities ( ) ; $ sids = IdentityUtils :: merge ( $ sids , GroupSecurityIdentity :: fromToken ( $ event -> getToken ( ) ) ) ; $ event -> setSecurityIdentities ( $ sids ) ; } catch ( \ InvalidArgumentException $ e ) { // ignore } }
Add group security identities.

@param AddSecurityIdentityEvent $event The event
Add group security identities .