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

πŸ‘‹ We're looking at following this to remove Silex -

U017Y69D9U4
U017Y69D9U4 Posts: 34 πŸ§‘πŸ»β€πŸš€ - Cadet

πŸ‘‹ We're looking at following this to remove Silex - https://docs.spryker.com/docs/scos/dev/migration-concepts/silex-replacement/silex-replacement.html#removing-silex

But this doesn't seem to be the whole picture. We've followed the migration guide above and made sure we have the required modules with at least the minimum versions, but still seem to be having some trouble. We've got Glue working as expected, but the communication to Zed is now failing.

We consistently get issues with routing to gateway controllers in Zed, which points to a Routing issue - but having followed the migration guide for the router (https://docs.spryker.com/docs/scos/dev/module-migration-guides/migration-guide-router.html) and the module documentation (https://docs.spryker.com/docs/scos/dev/migration-concepts/silex-replacement/router/router-zed.html) we seem to be at a loss going in circles.

Much of the documented updates necessary appear to be deprecated already. Has anyone else managed to successfully remove the Silex dependency and encountered similar issues?

We've also been using https://github.com/spryker-shop/b2c-demo-shop as a bit of a reference but to no avail!

Comments

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    I removed Silex and his deps already 2 years ago circa.. Yes, the documentation is not really good to cover the whole picture..

    What is your problem now for the communication to ZED?

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

    Hi thanks for getting back so quickly! It looks like all the routing to Zed is failing at the moment.

    We're seeing log messages such as No route found for "POST /carts-rest-api/gateway/add-to-cart" . So it feels like a router plugin just needs registering.

    We've got the ZedRouterPlugin registered in Zed RouterDependencyProvider under the getBackendGatewayRouterPlugins() method but guessing that might be wrong?

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    did u warm-up the backoffice, backend-gateway, etc.. router ?
    this is my configuration

        /**
         * @deprecated Use {@link \Spryker\Zed\Router\RouterDependencyProvider::getBackofficeRouterPlugins()} instead.
         * @deprecated Use {@link \Spryker\Zed\Router\RouterDependencyProvider::getBackendGatewayRouterPlugins()} instead.
         * @deprecated Use {@link \Spryker\Zed\Router\RouterDependencyProvider::getBackendApiRouterPlugins()} instead.
         *
         * @return array<\Spryker\Zed\RouterExtension\Dependency\Plugin\RouterPluginInterface>
         */
        protected function getRouterPlugins(): array
        {
            return [
                new ZedRouterPlugin(),
                // This router will only be hit, when no other router was able to match/generate.
                new ZedDevelopmentRouterPlugin(),
            ];
        }
    
        /**
         * @return array<\Spryker\Zed\RouterExtension\Dependency\Plugin\RouterPluginInterface>
         */
        protected function getBackofficeRouterPlugins(): array
        {
            return [
                new BackofficeRouterPlugin(),
            ];
        }
    
        /**
         * @return array<\Spryker\Zed\RouterExtension\Dependency\Plugin\RouterPluginInterface>
         */
        protected function getBackendGatewayRouterPlugins(): array
        {
            return [
                new BackendGatewayRouterPlugin(),
            ];
        }
    
        /**
         * @return array<\Spryker\Zed\RouterExtension\Dependency\Plugin\RouterPluginInterface>
         */
        protected function getBackendApiRouterPlugins(): array
        {
            return [
                new ApiRouterPlugin(),
            ];
        }
    
  • U017Y69D9U4
    U017Y69D9U4 Posts: 34 πŸ§‘πŸ»β€πŸš€ - Cadet

    Ahh so we removed getRouterPlugins as it is labelled as deprecated! That seems to have resolved it! Thankyou very much!

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yes si deprecated but in the case u did not update the config then the gateway call use still this one. If u migrate completely to new back office concept then this method will become unused

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

    Interesting - is there documentation for this back office migration?

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    yes, of course.. u have to search here -> https://api.release.spryker.com/release-history

    There are all project changes that u have to make to complete the migration