symfony-cmf / Routing

Routing component building on the Symfony Routing component
Other
289 stars 70 forks source link

Fixing https://github.com/symfony-cmf/Routing/issues/236 #237

Closed korsarNek closed 4 years ago

korsarNek commented 5 years ago

The ChainRouter::generate function has a wider type for the name parameter than the UrlGeneratorInterface.

Some analysis tools like PHPStan check the PHPDoc to make sure the correct types are used.

With this change the PHPDoc for ChainRouter::generate reflects the widened type.

Q A
Branch? "master" for new features / the branch of the current release for fixes
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets 236
License MIT
Doc PR reference to the documentation PR, if any
dbu commented 4 years ago

is this fixed with #250 ?

dbu commented 4 years ago

symfony 5 support means that we deprecated to pass non-strings to the route generator. thanks to type widening, the chain router still can handle them for BC, but it is no longer recommended. i did #252 to clarify things in the phpdoc.