symfony-cmf / routing-bundle

Symfony bundle to provide the CMF chain router to handle multiple routers, and the dynamic router to load routes from a database or other sources.
160 stars 78 forks source link

Symfony 6.0 compatibility #471

Closed firstred closed 2 years ago

firstred commented 2 years ago
Q A
Branch? "master"
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Fixed tickets
License MIT
Doc PR

This PR makes the bundle compatible with Symfony 6.0.

I ran the patch-type-declarations script to automatically add types. Due to the required return types I had to drop PHP 7.4 support.

PHP 7.4 has been removed from the tests and PHP 8.1 has been added instead. Symfony 6.0 has been included as well.

Tested with commit cd882f0551183d9fb5e75ed56ed4a017181f1572 of the Routing library.

trsteel88 commented 2 years ago

@dbu, any work in progress to make this compatible with Symfony 6?

dbu commented 2 years ago

@dbu, any work in progress to make this compatible with Symfony 6?

i got no reaction on my comments here. i am not aware of any other efforts. glad if you want to give it a go (i'd prefer to not add more return type than absolutely necessary for now, the maximal return type / property type things we should do as a new major version as it is potential BC breaks)

trsteel88 commented 2 years ago

@dbu, any work in progress to make this compatible with Symfony 6?

i got no reaction on my comments here. i am not aware of any other efforts. glad if you want to give it a go (i'd prefer to not add more return type than absolutely necessary for now, the maximal return type / property type things we should do as a new major version as it is potential BC breaks)

I don't think we can release a minor version with Symfony 6.0 because of all the type hints. We would need to release a major version with the changes that @firstred has made?

dbu commented 2 years ago

i don't think we need those type declarations for symfony 6. only in places where we implement an interface method or overwrite a parent method. i am not sure if any of that is a BC break. when its only the DI classes they are not expected to be extended so should be ok. but would need to have a look.

trsteel88 commented 2 years ago

i don't think we need those type declarations for symfony 6. only in places where we implement an interface method or overwrite a parent method. i am not sure if any of that is a BC break. when its only the DI classes they are not expected to be extended so should be ok. but would need to have a look.

Was pretty straightforward with 5 changes - https://github.com/symfony-cmf/routing-bundle/pull/472

I didn't modify any tests.