Closed Xymanek closed 4 years ago
I can help with transferring to flex structure and updating forms to use class names instead of aliases but that's about it since I didn't work with any bundles other than admin
Maybe it could be a good idea to first go with 3.4 without flex and then move to flex? Just to not do too many things at once. The code on sandbox is really broken due to dependencies resolution and probably it will break when upgrading to SF 3.4 too
If we do this, I would go with php 7.1 to make easier to continue maintaining it later. I can try and help with this also.
Or even 7.2 ;)
@jordisala1991 wouldn't that just split the migration into more stages?
@kunicmarko20 @greg0ire agreed, there is zero reason to support older versions since it's a demonstration project, no a reusable library
Also for 4.0 - didn't symfony remove bundle inheritance?
Yes, it will split the migrations into more stages. I was just thinking on doing it in small steps that could give value instead of doing a big migration. But it can be done all at once
Or did you mean like
That would make sense
Yes, that's what I had in mind
I started doing some preliminary work on this and set two simple objectives:
php app\console
to run without problemsWhile doing (1) I also cleaned up composer.json
a bit by removing redundant entries (eg. sonata-project/comment-bundle
already requires friendsofsymfony/comment-bundle
, no point doing it again). In the end I got composer to successfully resolve (without crashing due to exceeding 1.5 GB memory limit....) and install everything. Here are my notes:
dflydev/markdown
is abandoned, replaced by michelf/php-markdown
willdurand/faker-bundle
requires fzaninotto/faker
~1.3
, while the lastest version is 1.7.1
. Last updated 2015, maybe use another bundle?twbs/bootstrap
on v3 (not v4), bumped to 3.3.7
jms/serializer-bundle
was downgraded from ^2.3.1
to ^1.5.0
for sonata-project/ecommerce
and friendsofsymfony/comment-bundle
sonata-project/ecommerce
latest stable requires symfony
^2.8
😢 - changing to 3.x-dev
replace
section (since we are using PHP 7.2 now)After that I started working on (2). I had to fix the autoloader, got rid of bootstrap file, added sonata-project/google-authenticator
package (by request of SonataUserExtension.php line 159
), fixed a couple of config files. Then, however, I hit a roadblock (...
means path to where the sandbox
folder is located):
In XmlFileLoader.php line 386:
Unable to parse file "...\sandbox\vendor\sonata-project\ecommerce\src\BasketBundle\DependencyInjection/../Resources/config\basket.xml".
In XmlUtils.php line 101:
[ERROR 1866] Element '{http://symfony.com/schema/dic/services}service', attribute 'factory-service': The attribute 'factory-service' is not allowed. (in file:/.../sandbox/ - line 24, column 0)
[ERROR 1866] Element '{http://symfony.com/schema/dic/services}service', attribute 'factory-method': The attribute 'factory-method' is not allowed. (in file:/.../sandbox/ - line 24, column 0)
The whole effort can be found here: https://github.com/Xymanek/sandbox/commit/6eec21de98514f5252612652807107219284dd02
P.S. Yes, I'm using windows
I think factory-service is an old, pre 2.8 of defining factories, to be checked.
What's the status of sonata-project/ecommerce?
The latest stable doesn't even support sf 3...
Stable won't support SF 3, because it was added on master for the next major version
Ah ok, when is the next major planned?
It is not planned yet
Ok, so should we target 3.x-dev
for sandbox, or should the ecommerce functionality be removed until it gets the next major release?
Probably using 3.x-dev is a better idea
Yeah, it will also help developing the ecommerce as well
(as my recent run-ins with bugs uncovered 😂)
I've got the console to run albeit by removing some things. You can see my efforts here: https://github.com/Xymanek/sandbox/tree/3.4
A question: are JMS AOP/Security bundles needed? I couldn't find them used anywhere... Also they aren't really maintained anymore (eg. security last release Oct 30, 2016) so maybe it makes sense to drop them?
To get sandbox to run I had to comment out some things - can somebody take a look? Also, what should the next steps be? Any suggestions?
A question: are JMS AOP/Security bundles needed? I couldn't find them used anywhere... Also they aren't really maintained anymore (eg. security last release Oct 30, 2016) so maybe it makes sense to drop them?
Yeah that should probably be removed.
To get sandbox to run I had to comment out some things - can somebody take a look? Also, what should the next steps be? Any suggestions?
Next steps would be to uncomment what you commented I guess? Or remove it completely?
Next steps would be to uncomment what you commented I guess? Or remove it completely?
Not for the missing features of sonataUserBundle, please let that commented for the moment instead.
I've got both php app/console
and http version to run. The HTTP version however doesn't really work as the PageBundle isn't able to match any site since fixtures are broken. Someone with knowledge (I only used Admin, Block and Core before) will need to look into them.
Attempting to loading a page currently produces 152 deprecations, here is a full list: https://prnt.sc/ifnw1r. The majority of them are:
@
or %
Also there are deprecations about extending from deprecated classes and using depreciated PHP function. The majority of them I can fix but someone will need to look into deprecated services:
- Using service id sonata.news.block.breadcrumb_archive different from block id news_archive is deprecated since 3.3 and will be removed in 4.
- Using service id sonata.news.block.breadcrumb_post different from block id news_post is deprecated since 3.3 and will be removed in 4.0.
- Using service id sonata.media.block.breadcrumb_view different from block id gallery_view is deprecated since 3.3 and will be removed in 4.0.
- Using service id sonata.media.block.breadcrumb_index different from block id gallery_index is deprecated since 3.3 and will be removed in 4.0.
- Using service id sonata.media.block.breadcrumb_view_media different from block id media_view is deprecated since 3.3 and will be removed in 4.0.
- Using service id sonata.product.block.breadcrumb different from block id catalog is deprecated since 3.3 and will be removed in 4.0.
- Using service id sonata.product.block.filters_menu different from block id sonata.product.block.product_menu is deprecated since 3.3 and will be removed in 4.0.
- Using service id sonata.seo.block.breadcrumb.homepage different from block id homepage is deprecated since 3.3 and will be removed in 4.0.
Also I just realized that I nuked some hand-written scripts (along with auto-generated composer ones). I'm planning to rewrite them as Phing tasks (or whatever they are called)
Bump
Can someone (with knowledge of sonata bundles) take a look at fixtures? Currently almost all of them crash...
How can I test fixtures? Or what is the error you are getting?
How can I test fixtures?
You can pull my fork I guess...
what is the error you are getting?
Check the latest commit in PR, I commented all errors there
@Xymanek Thanks for prepare sandbox 3.0. I develop it and I done. Now I slit it and push atomics PR to easy marge. Feel free to help with check it.
More info: https://github.com/sonata-project/sandbox/pull/616
This can be closed
When I first learned about Sonata project (basically admin bundle) the demo site was a great help in learning about what abilities SonataAdmin has. Unfortunately the code behind it is.. horribly outdated. PHP 5.3 and Symfony 2.5. Since I think it's a great exploration resource for new developers (since docs are quite overwhelming at that point) I think it would be a great idea to modernize it.
A good target would be flex structure with symfony 3.4. This way we don't have to deal with problems arising from fact that not all bundles are updated to support 4.0 and after the initial migration is finished upgrading to 4 won't be that hard.
One thing needs to be discussed: how to deal with fact that flex promotes bundle-less structure? Do we try to "collapse" the bundles?
What are your thoughts?