Closed mouad-mahfoud closed 4 years ago
sorry my english is not perfect. I think addition of support symfony 5.0 will result in a compatible
The support of symfony 5.0 is still not fully added. We are still working on it. Some of the packages provided by sonata are compatible ; but not all. Since the admin bundle is using a lot of them, it will certainly be the last bundle compatible with symfony 5.
If you want to make some PR to help us, don't hesitate ;)
Any news on that matter?
We're working on it, but that's not easy. You can help us if you want.
I would be glad if I could be a useful help for you. Thing is, I am relatively new to Symfony - and I know nothing about the inner workings of Sonata Admin. But if you have tasks I might be able to do within these boundary conditions tell me!
@MichaelPerlbach I think you can extract actions from CRUDController.
@VincentLanglet @core23 WDYT?
Refactoring is always nice, but I don't see why this would help for Symfony 5 ?
@greg0ire Gave an exemple with sonata-exporter here https://github.com/sonata-project/SonataAdminBundle/issues/5788#issuecomment-599190473
And then ask to do the same for other bundle https://github.com/sonata-project/SonataAdminBundle/issues/5788#issuecomment-600484369.
If we want sonataAdmin to support Symfony 5, we needs that every sonataAdmin dependencies support Symfony 5. So start with the dependencies.
We can't support symfony5 when we use controller.
Ok, you meant extending AbstractController
instead
Ok, you meant extending
AbstractController
instead
This too. I mean more split CRUDController
to improve extending CRUD actions by user. We should not keep do big controller in next major. We probably can't add support for symfony5 in sonata 3.
I mean more split
CRUDController
to improve extending CRUD actions by user. We should not keep do big controller in next major.
I disagree. Splitting the CRUDController is not needed for Symfony 5.
What are the minimal changes needed to be symfony 5 compatible, this is only what we should focus on.
If we want sonataAdmin to support Symfony 5, we needs that every sonataAdmin dependencies support Symfony 5. So start with the dependencies.
Is there an up to date overview of the specific changes that are needed?
Just to clarify: is it a goal to have Symfony 5 support in Sonata 3? Or is it a goal for Sonata 4?
@wbloszyk Will be the best to answer this 😅
@jorrit In SonataBlockBundle add support for:
In SonataIntlBundle add support for:
In SonataAdminBundle add support for:
This change will be probably enought to add this support in this bundles.
@wbloszyk : Do you mean version 3 of those three modules? Because SonataBlockBundle already has SF5 support but only in version 4.
Sonata 3 using BlockBundle 3. Add support in Sonata 3 for BlockBundle will be awsome too but much harder.
So if I understand it correctly, BlockBundle 3 also has to support Symfony 5?
All require dependencies have to support symfony 5 too.
On https://github.com/sonata-project/SonataAdminBundle/pull/5948#issuecomment-599140668 it was determined that SF 5 compatibility in Sonata 3 is not possible.
Hello everyone.
I just forked the project to work on the Symfony 5 compatibility. I don't know a lot about the Sonata admin bundle background, but for the moment I just changed symfony dependencies to "^5.1", and the composer install
worked. Of course I have some inheritance errors, I'm working on it, but it seems that the "sonata-project/admin-bundle" sub-dependencies has no problem with SF 5.1.
As I see with the @jorrit comment, you seem to have blocking problems with knp-menus but.. The issue is closed so maybe not. Idk...
Do you have a clear view of SF5-compatibility progress on your side?
@neimheadh : The issue was closed for the master branch which will one day be Sonata Admin v4 but I am trying to get a statement on whether SF5 support will ever be available for Sonata Admin v3.
On #5948 (comment) it was determined that SF 5 compatibility in Sonata 3 is not possible.
Only if you can avoid this BC-break.
We try to finish the v4, but it's not easy.
@neimheadh : The issue was closed for the master branch which will one day be Sonata Admin v4 but I am trying to get a statement on whether SF5 support will ever be available for Sonata Admin v3.
Yeah I see. Indeed I'm working on master branch. Are you interested I push my change on master when I'll be able to use Sonata (dev-master version) on my project?
We are really interested by any kind of PR to help us to finish the v4 or to add the Symfony 5 (or twig 3) support.
The current dev-master
branch can't be used. And that's a big issue, because we can't test manually any PR on the master branch.
The first step would be to fix this and allow to use both the SonataAdmin
and SonataDoctrineORMAdmin
dev-master branch together.
I think it's on the @wbloszyk plans, isn't it ?
Yes, I also try to make SonataDoctrineORMAdmin dev-master work on SF.5.1. Btw I see that @SonataAdmin/standard_layout.html.twig needs @SonataCore/FlashMessage/render.html.twig and @SonataTwig/FlashMessage/render.html.twig.
Is it a reason for sonata-project/admin-bundle not having sonata-project/core-bundle & sonata-project/twig-extensions dependencies?
Yes, I also try to make SonataDoctrineORMAdmin dev-master work on SF.5.1. Btw I see that @SonataAdmin/standard_layout.html.twig needs @SonataCore/FlashMessage/render.html.twig and @SonataTwig/FlashMessage/render.html.twig.
Is it a reason for sonata-project/admin-bundle not having sonata-project/core-bundle & sonata-project/twig-extensions dependencies?
It does have twig-extension
dependency.
A recent PR removed the Core dependency, I think, by the syntax, it requires @SonataCore/FlashMessage/render.html.twig OR @SonataTwig/FlashMessage/render.html.twig.
Yes, I'm working on it.
@SonataAdmin/standard_layout.html.twig
needs
@SonataCore/FlashMessage/render.html.twig
OR @SonataTwig/FlashMessage/render.html.twig
.
Now I'm working on replace CoreBundle by form- and twig- extensions 0.x. Then upgrade it to extensions 1.x. https://github.com/sonata-project/dev-kit/issues/697
To finish it i need improve FlashManager: https://github.com/sonata-project/twig-extensions/issues/89 https://github.com/sonata-project/twig-extensions/pull/90
At the end support the same BlockBundle version is require to allow use Sonata 3 and Sonata 4 together.
Yep my mistake, it is @SonataCore/FlashMessage/render.html.twig OR @SonataTwig/FlashMessage/render.html.twig.
So if I got it well @wbloszyk, the CoreBundle will be deprecated in the future in favor of SonataTwig (and some others)?
I finally have a working instance on SF5.1. Here what I had to do :
https://github.com/sonata-project/SonataAdminBundle/compare/master...neimheadh:master
https://github.com/sonata-project/SonataDoctrineORMAdminBundle/compare/master...neimheadh:master
Changed all sonata-project/doctrine-orm-admin-bundle symfony dependencies from ^4.3 to ^5.1
Added ^3.0 to sonata-project/doctrine-orm-admin-bundle twig dependency
Changed sonata-project/doctrine-orm-admin-bundle sonata-project/admin-bundle dependency to dev-master
Required sonata-project/twig-extensions:1.x-dev on my project
Required sonata-project/doctrine-extensions:1.x-dev on my project
And I'm good, with an empty Sonata project. I don't want to do the PR now as my dependencies changes are a little bit extreme, with no test for the moment of inheritance changes on SF4 and SF5.0. And I also don't know what are your workflow so... Feel free to tell me how to make my PR on your project if you're interested.
Hello, it's me again. Again a little change on AdminBundle fixing exception when I create a new admin on SF5.1 - just changed Symfony\Component\Translation\TranslatorInterface dependency to Symfony\Contracts\Translation\TranslatorInterface. Also fixed dependencies for CRUDController and FieldDescription: https://github.com/sonata-project/SonataAdminBundle/compare/master...neimheadh:master
I also allowed null Help one base fields, I don't know if it should be mandatory, but if I follow documentation, it shouldn't be.
Close this issue in favor for https://github.com/sonata-project/SonataAdminBundle/issues/6365
I am trying to install sonata admin bundle in a fresh Symfony 5 installation but I get this error : Problem 1