Calling Developers!
We are reenergizing our code contribution process! Learn More

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

Options
U015HHFCU1M
U015HHFCU1M 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?

Comments

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

    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.

  • U015HHFCU1M
    U015HHFCU1M Posts: 81 🧑🏻‍🚀 - Cadet
    Options

    Thanks, I'll check that.

  • U015HHFCU1M
    U015HHFCU1M Posts: 81 🧑🏻‍🚀 - Cadet
    Options

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

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    Options

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

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    Options

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

  • U015HHFCU1M
    U015HHFCU1M Posts: 81 🧑🏻‍🚀 - Cadet
    Options

    Shall I use composer update or composer require ?

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    Options

    composer require.. u have to constraint the package

  • U015HHFCU1M
    U015HHFCU1M Posts: 81 🧑🏻‍🚀 - Cadet
    Options

    Let me check.

  • U015HHFCU1M
    U015HHFCU1M Posts: 81 🧑🏻‍🚀 - Cadet
    Options
    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].
    
  • U015HHFCU1M
    U015HHFCU1M Posts: 81 🧑🏻‍🚀 - Cadet
    Options

    Unfortunately I'm blocked. Any ideas?

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    Options

    U have to update spryker sdk packages

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    Options

    Or sorry with —update dependencies

  • U015HHFCU1M
    U015HHFCU1M Posts: 81 🧑🏻‍🚀 - Cadet
    Options

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

  • U015HHFCU1M
    U015HHFCU1M Posts: 81 🧑🏻‍🚀 - Cadet
    Options

    I cannot do that.

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

    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)
    
  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    Options

    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.

  • U013EK8RD7A
    U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet
    edited December 2020
    Options

    yeah what I did is temporarily hacked ErrorHandlerEnvironment

  • U013EK8RD7A
    U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet
    Options

    the problem is that it does not respect silenced errors

  • U013EK8RD7A
    U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet
    Options

    and still throw exceptions

  • U013EK8RD7A
    U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet
    edited December 2020
    Options

    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

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    edited December 2020
    Options
  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    Options
    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
    
  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    Options

    Danke Valerii!