Closed wbloszyk closed 3 years ago
I thought the type hints would be in the 5.0 release. The 4.0 is already pretty big.
@VincentLanglet sorry, my bad. I talking about all project. Anyway it is better think about it now.
Thanks for your listing @wbloszy ❤️
We already have an internal road map and a road to sonata 4 issue on our dev-kit. The steps your are mentioning are exactly our steps. Our main problem is time. We all want to release new major versions, but we have not enough time to finish this steps soon.
IMHO we made a mistake when we moved the core bundle to the new extensions repos. We should have made a 1:1 made a copy & paste of the original sources. But we added type hints and made some API changes. The only way to solve this issue in a smooth way is to backport the code to the extensions repo and release them as 0.x versions or we have hard BC breaks which will cause some pain if you want to upgrade to sonata 4.
Btw. there is a milestone with the (last) steps we need for the admin bundle: https://github.com/sonata-project/SonataAdminBundle/milestone/6
Thanks for informations. I don't know AdminBundle code very well. I will cofus to end AdminLTE upgrade and webpack. Then I will check what must be do to prepare extensions in 0.x version.
@core23 I almost done #5989. I can not finish it on dependencies part like UserBundle. I check diff CoreBundle with extensions. It is possibile to create backport from 1.2 versions. Bundle config must stay in Core, extensions should have own too, and 0.x extensions must required Core. This will resolve composer version, but make another one. 0.x should be equal to 1.x but without return Types hints. Are you agree? I will work on it. I will finish it on jest week, becouse need free weekend.
I just realised this morning that removing a return type declaration is not a BC-break. How about we remove them (or at least, the ones that prevent us from upgrading) in 1.x, and then add them back in 2.x?
There are also other change in API, like add support for contracts, drop support for some parameters. Remove return Types hints is not bc-break becouse user can add, but cant delete them. So we have 2 options:
Also remember 1.x is relased and someone can use it now. Add support for older version is strange thing. Also 0.x should be support as long as Sonata3 is - i think not long.
For me: option 1
Ok for option 1 too, I did not have the API changes in mind.
Can you create 0.x branch from 1.2 tag for form and twig extensions? I will try finish it in Tuesday. I will also use it in #5989 demo, so i will check on practice how this upgrage process work.
Done.
WDYT should we release CoreBundle 4.0 for use 0.x extensions? Remove extensions from Core required drop some service and is bc-break so i think it good way to force user to drop it. 4.0 can be used like check is bundle "ready for sonata 4". Also this will be good "first step" in sonata upgrade process.
It might make sense yeah :) So IIUC, core bundle 4 would be an empty shell requiring 0.x extensions, correct? And services defined in it would become deprecated aliases to extension services?
At first Core must drop all duplicated code (which is move to extensions). Later all other code must be mark as deprecated but mast stay in bundle to keep BC. After upgrade all bundles (ALL!!!) to Sonata 4
user should drop it. So:
Add CoreBundle 4 - to start upgrade.
Remove CoreBundle 4 - all code is upgraded.
BTW I finish work on 0.x extensions and Core 4. Now I am working on deprecations notice and tests.
@greg0ire @core23 and other @sonata-project/contributors WDYT?
I just relized something. I chek it and it is work. We can resolve upgrade problems by SonataCoreBundle 4
.
core-bundle 3.x || 4.x
to resolve extensions conflictI'm okay with this, except some cases:
sonata-project/core-bundle 4.x should:
IMHO we could resolve the return type conflict by removing all return types in our *-extensions repos. And add them back with the next major version of the extensions.
@core23 I add two issues which you should see and check. This will resolve some upgrade problems.
https://github.com/sonata-project/SonataCoreBundle/issues/739 and https://github.com/sonata-project/SonataBlockBundle/issues/700
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What next major change:
For me we should try make major upgrade process stepable:
Steps to prepare project to this process:
Drop CoreBundle conflict - prepare extensions
"sonata-project/core-bundle": ">=3.13 || <=3.18"
Drop CoreBundle conflict - prepare CoreBundle
Drop CoreBundle conflict - update bundles
^0.3 || ^1,3
extensions if they are use in any project also with major x.0 versionUpgrade BlockBundle is more anoing
Upgrade 3 => 4 changes
Upgrade option 1 - example
Upgrade option 2 - for me we should use it
Conclusion
Return type hints is the most BC-break thing in next upgrade.