sonata-project / SonataPageBundle

This bundle provides a Site and Page management through container and block services
https://docs.sonata-project.org/projects/SonataPageBundle
MIT License
216 stars 209 forks source link

Symfony 5 and 6 support #1410

Closed dunglas closed 2 years ago

dunglas commented 2 years ago

Feature Request

The bundle does not currently support recent versions of Symfony. Symfony 4 will not be maintained anymore in November. Is there a plan to make this bundle compatible with recent versions?

jordisala1991 commented 2 years ago

Hi! At this moment we are finishing the upgrade for SonataUserBundle, we have two more bundles missing an upgrade: SonataFormatterBundle and SonataPageBundle.

Sadly we are currently not a lot of people maintaining Sonata and we have to focus our efforts on the most used bundles.

We have another problem for this particular bundle. None of the current maintainers have ever used it.

Do you use this bundle? Do you have time to help us upgrading it?

VincentLanglet commented 2 years ago

Btw, our todo list for all the sonata bundle can be found here https://github.com/sonata-project/dev-kit/issues/1715

kursez commented 2 years ago

How can I get in contact with the people that are helping making this happen, I want to contribute

greg0ire commented 2 years ago

@kursez I would recommend #sonata on the symfony-devs slack.

VincentLanglet commented 2 years ago

We can use this issue to discuss about what to do @kursez. @jordisala1991 and I can help you about the changes needed.

To be able to support SF5/6, we'll have to drop the following bundle:

The first one need to be replaced by the Symfony messenger component, the second one by the Symfony cache.

But the first step could be, on the 4.x branch of SonataPageBundle to bump the version in the composer.json https://github.com/sonata-project/SonataPageBundle/blob/3.x/composer.json#L28-L38 to use SonataAdmin 4 and SonataBlock 4 and then update all the code in this bundle to make it work.

mareckigit commented 2 years ago

Have you started work on the new version yet?

VincentLanglet commented 2 years ago

Have you started work on the new version yet?

I don't think anybody started, so feel free to provide a PR.

Haniki commented 2 years ago

Hi, I tried that on my own, it should be working with SF4. I won't have time to continue this, and I'm not sure to understand enough this project to make it the right way.

Anyways I've made a pull request in case it might help. Feel free to improve my code or delete that PR if it is not what it supposed to be like.

mareckigit commented 2 years ago

@VincentLanglet What do you mean by drop SonataCacheBundle? Basically, I don't see the need to use an ESI / SSI / JS ASYNC cache for blocks. Blocks can be saved in the Symfony cache like Redis and this is part of the Block Bundle.

VincentLanglet commented 2 years ago

@VincentLanglet What do you mean by drop SonataCacheBundle? Basically, I don't see the need to use an ESI / SSI / JS ASYNC cache for blocks. Blocks can be saved in the Symfony cache like Redis and this is part of the Block Bundle.

Those dependency need to be removed https://github.com/sonata-project/SonataPageBundle/blob/3.x/composer.json#L30-L31 because they are not maintained anymore.

I don't know why they are currently used ; but either the feature must be removed, either it must be migrated to something else like symfony cache.

mareckigit commented 2 years ago

I understand why they should be removed, but don't see the need to replace them. I'm going to prepare fork to build the version without SonataCacheBundle and SonataNotificationBundle. My goal is compatibility with SF 5.4 and PHP 8.0.

@Haniki the current official release 3.x works with SF 4.4

VincentLanglet commented 2 years ago

@Haniki the current official release 3.x works with SF 4.4

he meants SF5/6

eerison commented 2 years ago

I saw your MR @Haniki, But it's quite big 😄

@mareckigit @kursez and @Haniki (in case you find some time for this 😃 )

what do you think to create small Pull requests and we going to merge this into 4.x branch?

because to review a PR with all stuffs are quite hard I guess!

we could open different PR for example:

the idea is just create small PR and the others can work in different parts, I want to help too, but I need to know what exactly you are working on and what you have done!

Or do you think is it better to be handled by one person only?

cc @VincentLanglet

VincentLanglet commented 2 years ago

cc @VincentLanglet

I agree it will be easier to review.

he said that he won't have time to continue this, so

eerison commented 2 years ago

I saw your MR @Haniki, But it's quite big 😄

@mareckigit @kursez and @Haniki (in case you find some time for this 😃 )

what do you think to create small Pull requests and we going to merge this into 4.x branch?

because to review a PR with all stuffs are quite hard I guess!

we could open different PR for example:

  • [ ] remove SonataNotificationBundle
  • [ ] remove SonataCacheBundle
  • [ ] Add compatibly with Symfony 5
  • [ ] Remove deprecated code
  • [ ] Add compatibly Symfony 6

the idea is just create small PR and the others can work in different parts, I want to help too, but I need to know what exactly you are working on and what you have done!

Or do you think is it better to be handled by one person only?

cc @VincentLanglet

Ok, I'll take this as a start

I will do the remove SonataNotificationBundle 😃

mesiarm commented 2 years ago

What is missing to Symfony 5 and 6 support?

eerison commented 2 years ago

What is missing to Symfony 5 and 6 support?

Hi @mesiarm we're trying to keep the issues listed in this ticket #1416 and 4.0 milestone , our main priority is support Symfony 5 and sonata 4 first.

there you can see the tickets that are missing, But we are more or less stuck in this ticket: #1417

really soon we hope to finish this ticket, and we can start the others, But until there if you want to test the branch 4.x and see if you can find some issue, fell free.

VincentLanglet commented 2 years ago

This will be close by https://github.com/sonata-project/SonataPageBundle/pull/1491