-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symfony 5 compatibility #5788
Comments
Feel free to help us supporting symfony 5 @mouad-mahfoud |
@core23 How can we help? Would it be correct to clone the latest version, then upgrade all symfony packages via composer to 5.*, then run the tests and fix all errors? Is that enough? I want to do this in the holidays. |
That's the way you go. But keep in mind, that we have version lock because of required (dev-)dependencies: #5797 (comment). There are also more third party dependencies that may need an update to work with symfony 5
💯 ! |
I think this is too much for me, sorry, somebody else has to do it.. |
help please |
Feel free to help with this by contributing @Bodarev |
Have same problem, but with assets:
|
This is not an issue with Symfony 5 but only Twig 3. |
Yeah plus, starting with just Twig 3 might be easier. |
It is clear that Sonata Admin doesn't work with Symfony 5. Until support is added, perhaps a warning could be added to the installation instructions? I can submit a PR for this, but first I'd like to know if this sounds like a good idea. |
If I got you right: You want a warning, that we don't support symfony 5? You have composer for that |
What I mean is that it could be helpful to list somewhere in the docs, let's say at https://sonata-project.org/bundles/admin/3-x/doc/getting_started/installation.html, which Symfony version(s) are supported. Composer does give warnings when installing on Symfony 5, but the warnings given refer to symfony/asset not being the right version, it does not clearly say what the root problem is: Sonata Admin is compatible with Symfony up to 4, not 5. Perhaps the message currently given by composer is sufficient for most users, but a small addition to the manual would not hurt, I think. |
IMHO it's overhead to update two places for every dependency. If we start to list supported symfony versions, we must also list supported versions of php, doctrine, twig, phpunit, ... |
I agree In the initial issue, composer return the following message.
This seems pretty clear. |
If anyone wants to help, here is where to start:
|
As an update to @greg0ire's last comment…
|
Both PR have been merged |
@goetas here is one more : schmittjoh/JMSTranslationBundle#522 :) |
The AdminBundle will need to drop support of 3.x blockbundle to be Symfony is 5 compatible or we'll need to fix some deprecation on the 3.x version. For example:
Does updating the major version of a dependency is a BC-break @greg0ire ? |
AdminBundle will need to add support for 4.x of BlockBundle. It wouldn't necessarily need to drop support for 3.x. |
Oh yeah indeed. |
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 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 #5948 (comment) 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 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. |
Only if you can avoid this BC-break. We try to finish the v4, but it's not easy. |
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 The first step would be to fix this and allow to use both the |
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 |
Yes, I'm working on it. Now I'm working on replace CoreBundle by form- and twig- extensions 0.x. Then upgrade it to extensions 1.x. To finish it i need improve FlashManager: 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 :
sonata-project/SonataDoctrineORMAdminBundle@master...neimheadh:master
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. 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 #6365 |
I am trying to install sonata admin bundle in a fresh Symfony 5 installation but I get this error :
Problem 1
- Conclusion: don't install sonata-project/admin-bundle 3.56.1
- Conclusion: remove twig/twig v3.0.0
- Installation request for sonata-project/admin-bundle ^3.56 -> satisfiable by sonata-project/admin-bundle[3.56.0, 3.56.1].
- Conclusion: don't install twig/twig v3.0.0
- sonata-project/admin-bundle 3.56.0 requires twig/twig ^2.10 -> satisfiable by twig/twig[v2.10.0, v2.11.0, v2.11.1, v2.11.2, v2.11.3, v2.12.0, v2.12.1, v2.12.2].
- Can only install one of: twig/twig[v2.10.0, v3.0.0].
- Can only install one of: twig/twig[v2.11.0, v3.0.0].
- Can only install one of: twig/twig[v2.11.1, v3.0.0].
- Can only install one of: twig/twig[v2.11.2, v3.0.0].
- Can only install one of: twig/twig[v2.11.3, v3.0.0].
- Can only install one of: twig/twig[v2.12.0, v3.0.0].
- Can only install one of: twig/twig[v2.12.1, v3.0.0].
- Can only install one of: twig/twig[v2.12.2, v3.0.0].
- Installation request for twig/twig (locked at v3.0.0) -> satisfiable by twig/twig[v3.0.0].
The text was updated successfully, but these errors were encountered: