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..
Dear Community, we are currently using the `cms-block-storage` module 1.2.1 and I want to update th
Dear Community,
we are currently using the cms-block-storage
module 1.2.1 and I want to update this to it's latest 2.1.0 version as we need that version because it will update a block in all stores and all their languages and not just in the languages of the current store.
I am exactly talking about
\Spryker\Zed\CmsStorage\Business\Storage\CmsPageStorageWriter::getLocaleNameMapByStoreName
which before was done by just calling $localeNames = $this->store->getLocales();
Updating that one module ended up in updateing a lot more:
β’ "spryker-shop/cms-block-widget": "~1.0.1" to "~2.1.0"
β’ "spryker/cms-block": "2.1.1" to "~3.0.2"
β’ "spryker/cms-block-category-connector": "~2.1.5" to "~2.3.0"
β’ "spryker/cms-block-category-storage": "~1.2.1" to "~1.4.2"
β’ "spryker/cms-block-gui": "~2.1.1" to "~2.4.0"
β’ "spryker/cms-block-product-connector": "~1.1.4" to "~1.3.0"
β’ "spryker/cms-block-product-storage": "~1.2.1" to "~1.4.1"
β’ "spryker/cms-block-storage": "~1.2.1" to "~2.1.0"
β’ "spryker/product": "~6.7.0" to "~6.12.0"
I use "~" because Spryker will break if you use "^" and do a composer update.
One thing that makes me uneasy is that this will increase spryker/product
by 5 minor versions as the spryker/cms-block-product-connector has a hard dependency here.
Still that didn't break our system. What did break our system is the deprecation and final removal of CmsTwigFunctionServiceProvider()
and CmsBlockTwigFunctionServiceProvider()
.
So now those two are CmsTwigPlugin()
and CmsBlockTwigPlugin()
and those won't belong into registerServiceProviders()
providers anymore.
Sadly I now don't know what to do as it seems the YvesBootstrap did change. If I take a look at the current YvesBootstrapk in the spryker-shop/b2b-demo-shop
it doesn't tell me where to register those plugins now.
All in all this means there is a BC break inside of those modules as the don't seem to run with our older application stack now.
To me it seems there are now 2 Versions of Spryker and at some point you have to do the transition from the old one to the new. And there is no feature update for the old API versions of the modules.
I would be happy about any suggestion.
Comments
-
cc: @UQK3ZPJEN @UKBSZ8M8W
0 -
Hi Karsten, it sounds to me like you need support from one of our integration guides. I don't know if I fully understand your issue but this might be able to help you: https://documentation.spryker.com/v2/docs/cms-block-widget-integration-201903
0 -
Sorry don't know what do to with that guide. I am writing about composer update and all in all I believe Spryker now has at least 2 different version of to intergrate things. So it doesn't help me to know the new integration path except that we won't get any fitting updates anymore for our spryker version and have to integrate everything a new.
0 -
The TwigPlugins has to be registered in src/Pyz/Yves/Twig/TwigDependencyProvider.php now
protected function getTwigPlugins(): array
0 -
Thanks π and everything else works the same? Is there a migration guide? I believe I didn't find information about this
0 -
I started to upgrade every package from some of the first versions to the latest ones. I use the migration guides provided by spryker https://documentation.spryker.com/docs/mg-cms
0 -
Hey Karsten, the fact that minor update has broken your shop by removing plugins is sad.. The upgrade guide is described here: https://documentation.spryker.com/docs/updating-a-spryker-based-project
Minor updates can cause troubles, especially for overwritten classes. In this case - automated tests are your best friend. Iteratively updating modules and running tests and tools (also phpstan is helpful, too) - is the best way.
0 -
and yes, sometimes a major update can cause cascading updates of other modules. Probably you could first update them (after you know which already) + running the tests, and then updating to the major version
0 -
Dear @UKJSE6T47 this is exactly what I am doing and you can ask Valerii about how many times I told him the provided composer versions just won't match. In this case I am just puzzled that it seems we are the only ones with this kind of problem or nobody else dares to ask. Anyways.
0 -
As I wrote above I need to replace
CmsTwigFunctionServiceProvider()
andCmsBlockTwigFunctionServiceProvider().
as they are depricated.0 -
So I need to register
CmsTwigPlugin()
andCmsBlockTwigPlugin()
0 -
Those those are
TwigPluginInterface
and https://documentation.spryker.com/docs/twig-and-twig-extension states how to do that.0 -
So I guess from your docs that I now have to add to Yves
TwigDependencyProvider
for Cms and CmsBlock and include the cores TwigPlugins there?0 -
As far as I can guess I should find that configuration in the b2b suite example. But there is nothing. So where do I register those plugins.
0 -
Is there any upgrade guide since the old Providers are now depricated? I couldn't find one.
0 -
CmsTwigPlugin and CmsBlockTwigPlugin has to be registered in src/Pyz/Yves/Twig/TwigDependencyProvider.php
/** * @return \Spryker\Shared\TwigExtension\Dependency\Plugin\TwigPluginInterface[] */ protected function getTwigPlugins(): array { return [ ... new CmsBlockTwigPlugin(), new CmsContentWidgetTwigPlugin(), new CmsTwigPlugin(), ... ]; }
https://github.com/spryker-shop/suite/blob/master/src/Pyz/Yves/Twig/TwigDependencyProvider.php#L71
or what is ur question?0 -
@UM4BZSK7T very interesting case. The 1.2.1 version for cms-block-storage is 1 y.o, and the plugins youβre missing are part of Silex migration effort, the twig part (I just searched for CmsContentWidgetTwigPlugin in documentation): https://documentation.spryker.com/docs/migration-guide-twig and also https://documentation.spryker.com/docs/cms-feature-integration-guide. Have you done the βsilex migrationβ already? I want to figure out which dependency is missing..
0 -
whatβs your spryker/application version?
0 -
3.18.1
0 -
All out installed packeages so there are no questions π This is our update branch so I already updated the cms-block related packages.
0 -
hm, thatβs very interesting. So you do have silex migrated. And the use of TwigDependencyProvider and plugins are there https://documentation.spryker.com/docs/cms-feature-integration-guide#4--set-up-widgets
I believe you had a valid update path in your project that eventually lead you to the current situation, but itβs hard to trace it down to figure out at which step there were dependencies or instructions missing.. Good that you figured everything out π0 -
I will go through all the migration guids. As we are missing the TwigDependencyProvider there are some serious things missing I guess.
0 -
Oh and thanks a lot β€ π
0 -
no problem! Sometimes you can even find the related migration guides by searching for a specific class name
0 -
I am going through https://documentation.spryker.com/docs/migration-guide-twig Bsically is all connected now but I would say that the
spryker/twig
composer.json is missing tons of dependencies. For example the trans() function will not not be recognized anymore as it would be added byTranslatorTwigPlugin
Still we do use a much older version and as you can see in this commit https://github.com/spryker/translator/commit/63ec16ec39320cb0557e16a316e8966e5e7de164 the Twig Plugin was added end of July of 2019. So again I say there are basically 2 versions of spryker. Before plugin stacks and the later. But neither the migration guides or the composer files give a hint. The newer Twig version is bound to a later version of
spryker/tranlate
and there are like 15 more plugins I am currently missing an I have no clue what it means to pull them in our Spryker stack.0 -
I would be really happy if you deprecate every thing older then XY or update the composer.json files so they are reliable. I am aware that updating all like 750 Spryker packages is hell and you have probably no interest to do that in the older versions. But please consider to do this in the future so this can't happen again.
0 -
Karsten, thanks for your feedback! We will look into the twig module - maybe we will find a pattern that we could apply to other modules or spot other missing dependencies. And yes, as you noticed already, maintaining/fixing now dependencies for all majors of all modules is time consuming π however, our team develops more and more tools that help us not to miss such things in future. Such feedbacks are a huge help in developing them, thank you a lot!
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random