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 guys πŸ‘‹ after updating some of the modules to newer version we are getting the `Uncaught Erro

USZ0XG6SK
USZ0XG6SK Posts: 111 πŸ§‘πŸ»β€πŸš€ - Cadet

Hi guys πŸ‘‹ after updating some of the modules to newer version we are getting the Uncaught ErrorException: Use of undefined constant APPLICATION_CODE_BUCKET Did anyone have this issue? Is there some info what has to be done to avoid it?

Comments

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

    @UKBSFUDEJ I feel you have insights here.

  • Tamas Nyulas
    Tamas Nyulas Application Architect Posts: 20 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi, could you be more specific, which module and what version is throwing this?

  • USZ0XG6SK
    USZ0XG6SK Posts: 111 πŸ§‘πŸ»β€πŸš€ - Cadet
    PHP Fatal error:  Uncaught ErrorException: Use of undefined constant APPLICATION_CODE_BUCKET - assumed 'APPLICATION_CODE_BUCKET' (this will throw an Error in a future version of PHP) in /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/ClassResolver/ModuleNameResolver.php:36
    Stack trace:
    #0 /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/ClassResolver/ModuleNameResolver.php(36): Spryker\Shared\ErrorHandler\ErrorHandlerEnvironment->Spryker\Shared\ErrorHandler\{closure}(2, 'Use of undefine...', '/data/vendor/sp...', 36, Array)
    #1 /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/ClassResolver/ModuleNameResolver.php(19): Spryker\Shared\Kernel\ClassResolver\ModuleNameResolver->getCodeBucket()
    #2 /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/ClassResolver/ClassInfo.php(65): Spryker\Shared\Kernel\ClassResolver\ModuleNameResolver->resolve('Monitoring')
    #3 /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/ClassResolver/AbstractClassResolver.php(153): Spryker\Shared\Kernel\ClassResolver\ClassInfo->setClass('Sp in /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/ClassResolver/ModuleNameResolver.php on line 36
    
  • USZ0XG6SK
    USZ0XG6SK Posts: 111 πŸ§‘πŸ»β€πŸš€ - Cadet

    i believe after updating spryker/kernel to https://github.com/spryker/kernel/releases/tag/3.48.0

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

    i have the same version and integration but no errors..

    as specified in expcetion
    this will throw an Error in a future version of PHP the question is: which version of php are u using?
    7.2 and 7.3 no problems

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

    7.3

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

    ok.. strange..
    do u have

        /**
         * @deprecated Exists for BC reasons.
         *
         * @return void
         */
        protected static function defineCodeBucket(): void
        {
            if (!defined('APPLICATION_CODE_BUCKET')) {
                define('APPLICATION_CODE_BUCKET', APPLICATION_STORE);
            }
        }
    

    in vendor/spryker/config/src/Spryker/Shared/Config/Config.php ?

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

    maybe u override this on pyz level because it is called in init function of config

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

    and there is another define of APPLICATION_CODE_BUCKET in vendor/spryker/config/src/Spryker/Shared/Config/Application/Environment.php

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

    will check it, thanks for pointing it out

  • Tamas Nyulas
    Tamas Nyulas Application Architect Posts: 20 πŸ§‘πŸ»β€πŸš€ - Cadet

    yeah, that would have been my next question, thx @UL65CH0MC

  • Tamas Nyulas
    Tamas Nyulas Application Architect Posts: 20 πŸ§‘πŸ»β€πŸš€ - Cadet

    Kernel do require new version of Config module, thus OOTB it’s supposed to work unless there are project customizations

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

    Thank you for your answers. In the end it was the problem with docker-sync. Reseting the containers did the trick.

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

    It's time to recommend to use Linux. πŸ˜„