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

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?

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet
  • Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet

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

  • 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

  • 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. πŸ€”

  • Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet

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

  • Posts: 70 πŸ§‘πŸ»β€πŸš€ - Cadet
    RequestAttributesEventDispatcherPlugin
    

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

  • Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet

    oh sorry, did overread it twice -.-

  • 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 πŸ™‚

  • 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.
    
  • 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?

  • 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.
    
  • 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
            );
    [...]
    
  • Posts: 70 πŸ§‘πŸ»β€πŸš€ - Cadet

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

  • SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

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

  • Posts: 70 πŸ§‘πŸ»β€πŸš€ - Cadet

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

Welcome!

It looks like you're new here. Sign in or register to get started.