Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader#32582
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader#32582
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
3f70fa0 toc21dc3fCompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Routing/Loader/DependencyInjection/ServiceRouterLoader.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Routing/Loader/DependencyInjection/ServiceRouterLoader.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
2593241 to90c0d7fCompareUh oh!
There was an error while loading.Please reload this page.
90c0d7f to3d68427Comparesrc/Symfony/Component/Routing/Tests/Fixtures/TestObjectRouteLoader.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
3d68427 to234fe4bCompareUh oh!
There was an error while loading.Please reload this page.
234fe4b tod0b5ec1Compare
chalasr left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
with minor comment
Uh oh!
There was an error while loading.Please reload this page.
…r of ContainerLoader and ObjectLoader
d0b5ec1 to1548101Comparenicolas-grekas commentedJul 23, 2019
Thank you@fancyweb. |
…eLoader in favor of ContainerLoader and ObjectLoader (fancyweb)This PR was merged into the 4.4 branch.Discussion----------[Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets |#30926 (comment)| License | MIT| Doc PR | -This PR aims at deprecating some things to have a more consistent code.### ServiceRouterLoader1. This class actually fetches an object from a container. In#30926 (comment), it was suggested that it should be renamed to `ContainerRouteLoader`. Actually I think it's better to rename it to `ContainerLoader` since all others route loaders does not have "Route" in their name. Let's be consistent!2. This class is in a `DependencyInjection` sub directory for historical reasons. Let's remove that! It accepts any PSR-11 container.### ObjectRouteLoader1. This class has "Route" in its name too. Let's rename it!2. This class is supposed to be an abstract implementation for "object" loaders to reuse, but in its code it has a lot of references to "services". Let's remove those references! That means renaming some methods, altering messages, etc.. That also means removing the `supports` method from it to let extending classes implement it.3. IMHO, this abstract implementation is useless. We sould just deprecate the whole class and move the implemention in the `ContainerLoader` class.Commits-------1548101 [Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader
…erLoader, ObjectRouteLoader and routing.loader.service (fancyweb)This PR was merged into the 5.0-dev branch.Discussion----------[Routing][FrameworkBundle] Remove deprecated ServiceRouterLoader, ObjectRouteLoader and routing.loader.service| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | yes| Deprecations? | no| Tests pass? | yes| Fixed tickets | è| License | MIT| Doc PR | -Remove deprecations from#32582Commits-------4dc9ff6 [Routing][FrameworkBundle] Remove deprecated ServiceRouterLoader, ObjectRouteLoader and routing.loader.service
…rs (fancyweb)This PR was merged into the 4.4 branch.Discussion----------[FrameworkBundle][Routing] Private service route loaders| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#30402| License | MIT| Doc PR |symfony/symfony-docs#11337Continuation of#30926.~Please review only the 2nd commit, I'm building this on top of#32582Commits-------64aa2c8 [FrameworkBundle][Routing] Private service route loaders
…rs (fancyweb)This PR was merged into the 4.4 branch.Discussion----------[FrameworkBundle][Routing] Private service route loaders| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |symfony/symfony#30402| License | MIT| Doc PR |symfony/symfony-docs#11337Continuation ofsymfony/symfony#30926.~Please review only the 2nd commit, I'm building this on top ofsymfony/symfony#32582Commits-------64aa2c8529 [FrameworkBundle][Routing] Private service route loaders
… loaders (fancyweb)This PR was merged into the 4.4 branch.Discussion----------[Routing] Continue supporting single colon in object route loaders| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |#34612| License | MIT| Doc PR | -#32582 (comment) was a bad idea. The new `ObjectLoader` class is used directly on 4.4 since we detagged the old service (and the old one). So we need to support the old notation on it. It changes the exception message but it should be alright.Commits-------3c796e1 [Routing] Continue supporting single colon in object route loaders
This PR aims at deprecating some things to have a more consistent code.
ServiceRouterLoader
This class actually fetches an object from a container. In[FrameworkBundle][Routing] Add a new tag to be able to use a private service as a service route loader #30926 (comment), it was suggested that it should be renamed to
ContainerRouteLoader. Actually I think it's better to rename it toContainerLoadersince all others route loaders does not have "Route" in their name. Let's be consistent!This class is in a
DependencyInjectionsub directory for historical reasons. Let's remove that! It accepts any PSR-11 container.ObjectRouteLoader
This class has "Route" in its name too. Let's rename it!
This class is supposed to be an abstract implementation for "object" loaders to reuse, but in its code it has a lot of references to "services". Let's remove those references! That means renaming some methods, altering messages, etc.. That also means removing the
supportsmethod from it to let extending classes implement it.IMHO, this abstract implementation is useless. We sould just deprecate the whole class and move the implemention in the
ContainerLoaderclass.