Skip to content
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 - TODO list #6365

Closed
20 tasks done
wbloszyk opened this issue Sep 2, 2020 · 13 comments
Closed
20 tasks done

Symfony 5 - TODO list #6365

wbloszyk opened this issue Sep 2, 2020 · 13 comments
Labels

Comments

@wbloszyk
Copy link
Member

wbloszyk commented Sep 2, 2020

This is TODO list require to add support for Symfony 5.

Target branch: master (Sonata 4)
Reason: To much huge BC-break in Sonata 3 (list below).

Add support for Symfony 5.1 bundles (bundles related to Symfony version):

Changes in self code:

Library:

@wbloszyk wbloszyk pinned this issue Sep 2, 2020
@wbloszyk
Copy link
Member Author

wbloszyk commented Sep 2, 2020

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) to setTranslator(ContractsTranslatorInterface $translator) when user upgrade Symfony to 5. This will be BC.

@wbloszyk
Copy link
Member Author

wbloszyk commented Sep 2, 2020

@sonata-project/contributors @dmaicher @jaikdean

  • WDYT? Can we add it in Sonata3?

If I miss any problem, feel free to add notes about it.

@dmaicher
Copy link
Contributor

dmaicher commented Sep 2, 2020

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) to setTranslator(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.

@VincentLanglet
Copy link
Member

@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.

@wbloszyk
Copy link
Member Author

wbloszyk commented Sep 2, 2020

@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 😄

@dmaicher
Copy link
Contributor

dmaicher commented Sep 4, 2020

@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 😋

Also seeing that we keep adding support for symfony 5.1 components on 3.x like in #6363

Out of interest: For how long would 3.x still be maintained (features, bug fixes) after 4.0 was released?

@VincentLanglet
Copy link
Member

VincentLanglet commented Sep 4, 2020

@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.

@wbloszyk
Copy link
Member Author

wbloszyk commented Sep 4, 2020

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.

@eerison
Copy link
Contributor

eerison commented Oct 12, 2020

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 :)

@VincentLanglet
Copy link
Member

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: #6476
If you can help on it, it's perfect.

Otherwise you can help with some other Sonata4 PR like this issue #6404 ; since the symfony 5 compatibility will be only released with Sonata 4.

@jordisala1991
Copy link
Member

I think this can be closed tol

@jordisala1991 jordisala1991 unpinned this issue Oct 21, 2020
@dmaicher
Copy link
Contributor

I see a lot of things are happening on 3.x and master 💪 😊

Is there a todo list to see whats missing for releasing 4.0?

https://github.com/sonata-project/SonataAdminBundle/milestone/6 maybe ?

I'm really looking forward to a release with Symfony 5 support and would like to help if possible

@VincentLanglet
Copy link
Member

Is there a todo list to see whats missing for releasing 4.0?

https://github.com/sonata-project/SonataAdminBundle/milestone/6 maybe ?

Indeed, I try to keep the milestone up to date.
There is a lot of PR opened currently (and ready) but we're missing from maintainers time to review all of these (It's not the best period for github activity ^^). You may help with reviews/approval to catch errors faster.

The only missing issues are

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants