__Target branch:__ master (Sonata 4)
__Reason__: To much huge BC-break in Sonata 3 (list below).
Symfony\Bundle\FrameworkBundle\Controller\Controller](https://github.com/sonata-project/SonataAdminBundle/pull/6476)Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait](https://github.com/sonata-project/SonataAdminBundle/pull/6476)Symfony\Component\OptionsResolver\OptionsResolver::getExtendedTypes(): iterable;Symfony\Component\Translation\TranslatorInterface](https://github.com/sonata-project/SonataAdminBundle/pull/6476)Problem with TranslatorInterface we can resolve based on idea from comment:
https://github.com/sonata-project/SonataAdminBundle/pull/6342#discussion_r481826857
namespace Symfony\Component\Translation;
if (!interface_exists('Symfony\Component\Translation\TranslatorInterface')) {
/**
* @deprecated since sonata-project/admin-bundle 3.x, to be removed in 4.0. Use \Symfony\Contracts\Translation\TranslatorInterface instead.
*/
class_alias('Symfony\Contracts\Translation\TranslatorInterface', 'Symfony\Component\Translation\TranslatorInterface');
}
This alias will redirect ower setTranslator(ComponentTranslatorInterface $translator) to setTranslator(ContractsTranslatorInterface $translator) when user upgrade Symfony to 5. This will be BC.
@sonata-project/contributors @dmaicher @jaikdean
If I miss any problem, feel free to add notes about it.
Problem with TranslatorInterface we can resolve based on idea from comment:
#6342 (comment)namespace Symfony\Component\Translation; if (!interface_exists('Symfony\Component\Translation\TranslatorInterface')) { /** * @deprecated since sonata-project/admin-bundle 3.x, to be removed in 4.0. Use \Symfony\Contracts\Translation\TranslatorInterface instead. */ class_alias('Symfony\Contracts\Translation\TranslatorInterface', 'Symfony\Component\Translation\TranslatorInterface'); }This alias will redirect ower
setTranslator(ComponentTranslatorInterface $translator)tosetTranslator(ContractsTranslatorInterface $translator)when user upgrade Symfony to 5. This will be BC.
Imho we should not do this. We don't own that interface so we should not alias it. This can cause all kind of weird issues with other bundles/libraries that do things based on the existence of the legacy interface etc.
@sonata-project/contributors @dmaicher @jaikdean
- WDYT? Can we add it in Sonata3?
If it was easy, and didn't require BC-break, it would be ok. But it's not.
As explained in another discussion, I think we should focus on 4.0 to release it this year with the Symfony 5 support.
@VincentLanglet I create project based on admin and symfony 5. In issue description I add next problem to resolve which can not be done without huge BC-break on Sonata 3. I will add this issue to https://github.com/sonata-project/SonataAdminBundle/milestone/7
Update
My bad, we can do it in Sonata 4 as minor release :smile:
@greg0ire @wbloszyk @VincentLanglet so was there a decision if we want to support Symfony 5.1 on 3.x or not? I'm slightly confused by all the comments on different issues and PRs :yum:
Also seeing that we keep adding support for symfony 5.1 components on 3.x like in https://github.com/sonata-project/SonataAdminBundle/pull/6363
Out of interest: For how long would 3.x still be maintained (features, bug fixes) after 4.0 was released?
@greg0ire @wbloszyk @VincentLanglet so was there a decision if we want to support Symfony 5.1 on 3.x or not? I'm slightly confused by all the comments on different issues and PRs 馃構
It will certainly be on 4.0 rather than 3.x to avoid multiple BC-break.
If you want to help us, we take it !
Also seeing that we keep adding support for symfony 5.1 components on 3.x like in #6363
This was an easy change, with no BC-break and adding no complexity to the code.
Out of interest: For how long would 3.x still be maintained (features, bug fixes) after 4.0 was released?
Feature won't be added to 3.x as soon as we release 4.0 (except if does help our/the developer migration)
Bug could be backport to 3.x during some time, since the 4.0 introduce big changes. But keep in mind generally don't support multiple versions at the same time.
Out of interest: For how long would 3.x still be maintained (features, bug fixes) after 4.0 was released?
Feature won't be added to 3.x as soon as we release 4.0 (except if does help our/the developer migration)
Bug could be backport to 3.x during some time, since the 4.0 introduce big changes. But keep in mind generally don't support multiple versions at the same time.
I think we can support 3.x with some feature until we don't release whole Sonata4. Anyway we don't wanna do it for all PRs.
Well, I'm not sure if it's easy or not, But I'd like to help, I'll try to get this one symfony/console, But if you have some other suggestion to start could be good, because I'll see how it works :)
Well, I'm not sure if it's easy or not, But I'd like to help, I'll try to get this one
symfony/console, But if you have some other suggestion to start could be good, because I'll see how it works :)
Hi @eerison
I think that everything will be solved by this PR: https://github.com/sonata-project/SonataAdminBundle/pull/6476
If you can help on it, it's perfect.
Otherwise you can help with some other Sonata4 PR like this issue https://github.com/sonata-project/SonataAdminBundle/issues/6404 ; since the symfony 5 compatibility will be only released with Sonata 4.
I think this can be closed tol
Most helpful comment
I think this can be closed tol