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

Hello Everybody, I've upgraded ``merchant-custom-prices`` feature : `php -d memory_limit=-1 /usr/loc

Posts: 81 πŸ§‘πŸ»β€πŸš€ - Cadet
edited December 2020 in Slack General

Hello Everybody,
I've upgraded merchant-custom-prices feature :
php -d memory_limit=-1 /usr/local/bin/composer require "spryker-feature/merchant-custom-prices:^202009.0" --update-with-dependencies
As a next step I wanted to do console propel:install but faced an issue (attached).
Is this something you saw before?

Welcome!

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

Comments

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

    It might be that I'm wrong, but similar issues were discussed internally and the solution was to try to lock symfony/filesystem: 5.1.8.

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

    Thanks, I'll check that.

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

    Valerii, we're using "feature" approach in composer.json where there is no symfony/filesystem package. Do you have the same case?

  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    symfony/filesystem: 5.1.8 v. 5.1.10 it will be releases at end of this month

  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    composer required symfony/filesystem: 5.1.8 to constraint... when 5.1.10 released, then remove this constraint and run composer update

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

    Shall I use composer update or composer require ?

  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    composer require.. u have to constraint the package

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

    Let me check.

  • Posts: 81 πŸ§‘πŸ»β€πŸš€ - Cadet
    Problem 1
        - spryker-sdk/spryk 0.2.3 requires symfony/filesystem ^3.4.0 || ^4.0.0 -> satisfiable by symfony/filesystem[3.4.x-dev, 4.0.x-dev, 4.1.x-dev, 4.2.x-dev, 4.3.x-dev, 4.4.x-dev].
        - spryker-sdk/spryk 0.2.3 requires symfony/filesystem ^3.4.0 || ^4.0.0 -> satisfiable by symfony/filesystem[3.4.x-dev, 4.0.x-dev, 4.1.x-dev, 4.2.x-dev, 4.3.x-dev, 4.4.x-dev].
        - spryker-sdk/spryk 0.2.3 requires symfony/filesystem ^3.4.0 || ^4.0.0 -> satisfiable by symfony/filesystem[3.4.x-dev, 4.0.x-dev, 4.1.x-dev, 4.2.x-dev, 4.3.x-dev, 4.4.x-dev].
        - Can only install one of: symfony/filesystem[v5.1.8, 3.4.x-dev].
        - Can only install one of: symfony/filesystem[v5.1.8, 4.0.x-dev].
        - Can only install one of: symfony/filesystem[v5.1.8, 4.1.x-dev].
        - Can only install one of: symfony/filesystem[v5.1.8, 4.2.x-dev].
        - Can only install one of: symfony/filesystem[v5.1.8, 4.3.x-dev].
        - Can only install one of: symfony/filesystem[v5.1.8, 4.4.x-dev].
        - Installation request for symfony/filesystem  5.1.8 -> satisfiable by symfony/filesystem[v5.1.8].
        - Installation request for spryker-sdk/spryk (locked at 0.2.3) -> satisfiable by spryker-sdk/spryk[0.2.3].
    
  • Posts: 81 πŸ§‘πŸ»β€πŸš€ - Cadet

    Unfortunately I'm blocked. Any ideas?

  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    U have to update spryker sdk packages

  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    Or sorry with β€”update dependencies

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

    I ended up in a situation where I should update spryker/symfony

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

    I cannot do that.

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

    Then it might be no the same problem as was discussed internally. But it looked very similar:

    Command propel-copy-schema [vendor/bin/console propel:schema:copy] (In progress...)
    Store: DE | Environment: docker
    Clean schema directory
    Copy and merge schema files
    ErrorException - Exception: unlink(/data/src/Orm/Propel/DE/Schema/spy_acl.schema.xmlJglEnD): No such file or directory 
    in /data/vendor/symfony/filesystem/Filesystem.php (670)
    
  • SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Or you are on the previous major of symfony/filesystem. Could you check please your composer.lock file?
    In case you are on v3 or v4, there were also new releases that could cause this problem and you need to roll back to the previous one.

  • Posts: 127 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited December 2020

    yeah what I did is temporarily hacked ErrorHandlerEnvironment

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

    the problem is that it does not respect silenced errors

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

    and still throw exceptions

  • Posts: 127 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited December 2020

    so quick and dirty way is to just replace setErrorHandler method

    with

    /**
         * @return void
         * @throws \ErrorException
         */
        protected function setErrorHandler(): void
        {
            $errorLevel = error_reporting();
            $errorHandler = static function ($severity, $message, $file, $line): void {
                $exception = new ErrorException($message, 0, $severity, $file, $line);
    
                $levelsNotThrowingExceptions = Config::get(ErrorHandlerConstants::ERROR_LEVEL_LOG_ONLY, 0);
    
                // is exceptions silenced with @
                $isSilenced = error_reporting() === 0;
    
                $shouldThrowException = ($severity & $levelsNotThrowingExceptions) === 0 && !$isSilenced;
                if ($shouldThrowException) {
                    throw $exception;
                }
    
                // Only log non-silenced errors
                if (!$isSilenced) {
                    ErrorLogger::getInstance()->log($exception);
                }
            };
    
            set_error_handler($errorHandler, $errorLevel);
        }
    

    This way the composer or propel command will finish

  • SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    edited December 2020
  • SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    For those who had problems with symfony/filesystem, it seems that new versions with fixes were released. So you can update it to 5.2.1 or 4.4.18
    or 5.1.10
    
  • Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    Danke Valerii!

Welcome!

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