Update to Symfony 7
Hello,
I was testing to upgrade my applicaiton to symfony 7 but with no success. I try to update this pluging and launch php unit test but i'm facing some issue.
Once is related to the class "Symfony\Component\Routing\Loader\AnnotationClassLoader" who is not found. If i understand well this class is used by SensioFrameworkExtraBundle and has change with Symfony 7. So we have to switch with attributes this project or the best things is to make a pr on the SensioFrameworkExtraBundle project ? Do you need help for that.
Best regards.
Edit: I just see that the SensioFrameworkExtraBundle will not be maintained anymore.
yeah, annotations have been removed in Symfony 7, in favor of the attributes.
we need to provide our annotations as attributes as well. i am not sure about the error you get with AnnotationClassLoader, because nothing of FOSHttpCache directly uses that. maybe the sensio bundle has a bad composer.json.
we will also need to wrap up https://github.com/FriendsOfSymfony/FOSHttpCache/pull/549 which needs a new major version of the library. i think for the symfony bundle we don't need a new major, we should not need BC breaks.
Yes. So we are waiting for the other bundle to be updated before working on it now ?
i worked on the library, hopefully the 3.x branch will soon allow symfony 7.
if you have time to work on it, it would be great to add attributes for the things we currently only have as annotations. we should be able to extend the annotation classes, see e.g. https://github.com/doctrine/phpcr-odm/pull/852/files#diff-90e805dabc3794deefaa3c8f78b4a2e45df5c1d7e6f204dc5805a046dbeae207 (look at the attribute classes , the whole diff is quite big because documentation and tests and all that)
Yeah but i can start to check. I have a question for the namespace. Do we add two directory inside 'Configuration' folder like "Annotations" and "Attributes" ?
thanks! we can't move the annotations because that would be a BC break.
i suggest to create a new namespace Attributes at the top level of the bundle
oh, i just notice: we already have the annotations also be attributes. but the problem is that they extend the framework extra bundle base class.
could we make them no longer extend that class? maybe we need to duplicate a small thing from the ConfigurationAnnotation but should not need too much
so everything should be fine except we must not extend anything from framework extra bundle.
Yes and change the doc. But it will be a bc break ?
as long as the annotations still work (when using older symfony versions) its not a BC break. people are not expected to extend that code with their own and rely on specific base classes.
you should require fos http cache with 3.*@dev for now, the 3.* supports symfony 7. but needs a couple more cleanups before i can tag the release.
Thanks. I'm working now on a version without SensioFrameworkExtraBundle. I will make a release when it's ok.
best do a pull request to this repository, then we can release it here.
Anything that could be supported on this one?
@usu if you have some time, you could pick up the branch of #610 and try to wrap things up. looks like toxicity1985 is quite busy at the moment.
fixed in #611