What are the Slack Archives?

Itโ€™s a history of our time together in the Slack Community! Thereโ€™s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you wonโ€™t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi there, according to the spryker/router migration guide at

UKHR9UN00
UKHR9UN00 Posts: 70 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

Hi there,
according to the spryker/router migration guide at https://documentation.spryker.com/v4/docs/migration-guide-router we should add a

Spryker\Zed\Router\Communication\Plugin\EventDispatcher\RequestAttributesEventDispatcherPlugin

to our EventDispatcherDependencyProvider. This Plugin does not exist and it looks like this is causing \Spryker\Zed\Auth\Communication\Plugin\EventDispatcher\AuthorizationEventDispatcherPlugin::onKernelRequest to fail with endless redirects.
Any chance to provide the plugin source directly until the module is fixed?

Comments

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
  • UK7KBE2JW
    UK7KBE2JW Posts: 463 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    if u do not need it, just do not register the plugin

  • UKHR9UN00
    UKHR9UN00 Posts: 70 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited June 2020

    Hi Julian,
    thanks for your response.
    Yes, we're using (and depending on) this module.
    Like said the \Spryker\Zed\Auth\Communication\Plugin\EventDispatcher\AuthorizationEventDispatcherPlugin::onKernelRequest is currently failing, because

     $module = $request->attributes->get('module');
            $controller = $request->attributes->get('controller');
            $action = $request->attributes->get('action');
    

    always is null

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 โœจ - Novice

    Interesting, found an open PR that contains mentioned plugin in spryker\router module. Will clarify why it isn't merged. ๐Ÿค”

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Ah ok i thought its missing since u said its missing ^^

  • UKHR9UN00
    UKHR9UN00 Posts: 70 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    RequestAttributesEventDispatcherPlugin
    

    is the missing one. ๐Ÿ™‚
    @valerii.trots thanks!

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    oh sorry, did overread it twice -.-

  • UKHR9UN00
    UKHR9UN00 Posts: 70 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited June 2020

    @valerii.trots sorry for pushing, but is there any chance to provide me with the unmerged plugin so I can test it? This currently blocks me updating our project and I'm afraid this won't be the last issue ๐Ÿ™‚

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 โœจ - Novice
    Seems to be a mistake toย  mention it in the migration guide. Currently, theย \Spryker\Zed\Application\Communication\Plugin\ServiceProvider\RequestServiceProviderย takes care of this and this is added on core level which will be fixed in the Silex removal PR.
    
  • UKHR9UN00
    UKHR9UN00 Posts: 70 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited June 2020

    Not sure if I got you right.
    \Spryker\Zed\Application\Communication\Plugin\ServiceProvider\RequestServiceProvider is deprecated. How will it be replaced if not by the missing new Plugin?

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 โœจ - Novice
    It will be replaced later, currently there is no need to change anything about it as it is delivered and used in core.
    
  • UKHR9UN00
    UKHR9UN00 Posts: 70 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited June 2020

    But it will only be used if you call \Spryker\Zed\Application\ApplicationDependencyProvider::getServiceProviders which will also trigger a deprecated warning:

        protected function getServiceProviders(Container $container)
        {
            trigger_error(
                '\Spryker\Zed\Application\ApplicationDependencyProvider::getServiceProviders is deprecated, please copy all required ServiceProvider and remove the call to this method',
                E_USER_DEPRECATED
            );
    [...]
    
  • UKHR9UN00
    UKHR9UN00 Posts: 70 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    But your suggestion is to not use the missing plugin but keep the deprecated RequestServiceProvider until it's replaced, right?

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 โœจ - Novice

    Seems so. At least I understood it in this way.

  • UKHR9UN00
    UKHR9UN00 Posts: 70 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    I can confirm that using the RequestServiceProvider also solved the mentioned issue.