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, it seems that my last composer update of spryker packages didn’t work very well. For example

UPWG9AYH2
UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

Hello,
it seems that my last composer update of spryker packages didn’t work very well. For example between spryker session 4.6.0 (my previouse installed version) and 4.7.3 (newest). The spryker/silex dependency was removed which leads to a not found package in Application dependency provider … since no major version changed … why there is a non backward compatible change like this?
What do i miss here?
Best

Comments

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

    Hi Ingo!
    It seems that our team is aware of this problem and there was an update to fix the problem.
    Could you please try to update modules from this release https://api.release.spryker.com/release-group/2870?

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    Hi Valerii, ill give it a try … we dont have any kernel or application directive in our composer json file … is that something we should have or is this a temporary thing that can be removed later?

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    So i ran this

    composer require spryker/application:“^3.23.2” spryker/kernel:“^3.54.2" --update-with-dependencies

    No change

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

    Communicating.

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    Take your time 🙂

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

    In this case:

    The best option is to add silex on project level for now.
    
  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    Okay. Thanks a lot. Will this be resolved with the next updates? Best

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    So we are currently back to our old composer.lock state before the minor stuff

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    xxx  [9:34 AM]
    There are two options and both are mentioned here already:
    1. Update Application and Kernel to the latest patch versions
    2. Add spryker/silexphp in the root composer.json
    
    Valerii Trots  [9:35 AM]
    But the question is will this be fixed in the future?
    As they don't use Kernel and Application.
    
    xxx  [9:35 AM]
    They use Application and Kernel
    Probably it's not updated to the latest versions
    
  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    yyy  [9:39 AM] You said above he updated those and no change.. he should verify that those are latest versions. Just no change could also mean those are blocked from reaching. ¯_(ツ)_/¯

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    They use Application and Kernel

    Sure, i use, but its not explicit mentioned in the composer.json … it will be pulled via other dependencies for sure. I’ll do

    composer update spryker/*

    again and give feedback in a few minutes

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    okay i think i got the error

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    now i was doing

    composer update spryker/*

    Before i was obviously doing

    composer update

    which leads unfortunately to

    • Removing spryker/silexphp (0.3.8)
       - Removing spryker/silex (2.2.1)
  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    but i cant figure out what leads to removing the silex stuff since it should still be a dependency from the last code base

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    Hi.. I have today the same problem 😞

    So it means that the right solution for now is just require again spryker/silex in composer json?
    @valerii.trots

    Thanks in advance for your feedback.

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    I use the last kernel and application plugin version but it seems that some code need further the silex Application Class to run...
    How it is possible?

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

    @ULYHPR789 Do you have any thoughts about the topic?

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    edited August 2020

    It seems that the problem is related to Application class in Kernel Module. Here vendor/spryker/kernel/src/Spryker/Shared/Kernel/Communication/ApplicationProxy.php:19 the if check if Silex Application Class exists... via use namespace... Of course now it was removed from composer update

  • sprymiker
    sprymiker Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    The fastest solution - add silex on project level.

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    Thanks @ULYHPR789
    yes I know that this is of course the fast solution.. but for me it is not 100% correct and i want properly remove any dependency from silex.. and as i seen only the old service provider use it and the Application Class..

    It means that are u working further in core on this problem to remove definitively silex deps or it is possible to remove already now it?

  • sprymiker
    sprymiker Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    We are on the way to fully remove it. However the task is not finished.

    @valerii.trots can find the specific modules+versions to update to solve Application class issue.

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    Ok. it sounds better now..
    thanks..

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    edited August 2020

    For me the latest spryker update solved it temporary, so just update spryker/* … i made the mistake and did update all packages. For whatever reason the dependency gets removed completely on the latter but not on the first

  • sprymiker
    sprymiker Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    One important moment: you must not use service providers and use proper bootstrap classes.

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    @UPWG9AYH2 yes i read your post.. but is just a temp solutions...

    @ULYHPR789: yes i know.. we did not use since a lot of time no service providers more.. only application plugin classes

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    Ah.. let me check if zed uses the right bootstrap class.. because i see too the yvesBootstrap has also a new class..

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    Bootstrap classes extend all the new one .....\Bootstrap\.....

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    edited August 2020

    There are still 17 usage as import statement of Application Class that has use Silex.... (naturally ignore some service provider and deprecated classes not used more)...

    p.s.: only ZED Application deprecated Class where is suggested direct to use Application Class located in Shared.