Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Routing] Deprecate RouteCollectionBuilder#32937
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 RouteCollectionBuilder#32937
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/Symfony/Component/Routing/Loader/Configurator/RoutingConfigurator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Routing/Loader/Configurator/RoutingConfigurator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@nicolas-grekas ,@Tobion , could you please give me some feedback so that I can move on? |
@Tobion would you have time to help move this one forward soonish? Otherwise, I'd suggest to close (and keep the issue open) |
@nicolas-grekas , don't close the PR, please. I will have time to make it ready for review soon. At least we'll discuss it at the hack day in Lisbon ;) |
570a239
to16d5a6d
Compare@nicolas-grekas , ready for review with tests and deprecations! I will finish the CHANGELOG and add the docs once you agree with the implementation. For now I rebased onto master. Do we have any chance to get this in 4.4? Or it's too late? |
Uh oh!
There was an error while loading.Please reload this page.
@nicolas-grekas , fully ready for you review |
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.
I really like the idea! Would be great to do the same for services late on ;)
vudaltsov commentedNov 24, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Yes, I already started in the airplane yesterday ;) |
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.
@fabpot, thanx, corrected! |
badef1d
toe641cbd
CompareThank you@vudaltsov. |
…in MicroKernelTrait::configureContainer() (nicolas-grekas)This PR was merged into the 5.1-dev branch.Discussion----------[FrameworkBundle] Allow using a ContainerConfigurator in MicroKernelTrait::configureContainer()| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -This PR is a continuation of#32937 (it reverts some parts of it that are not needed anymore). It builds on#34872 for now.This PR allows using the PHP-DSL natively in our `Kernel::configureContainer()` methods.It allows the same in our `Kernel::configureRoutes()` methods.Both signatures are handled gracefully with no deprecations to let existing code in peace:- `protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader);`- `protected function configureContainer(ContainerConfigurator $c);` (a loader is always passed as 2nd arg to ease FC)Same for routes:- `protected function configureRoutes(RoutingConfigurator $routes);`- `protected function configureRoutes(RouteCollectionBuilder $routes);` (this one is deprecated because `RouteCollectionBuilder` is deprecated)Here is my working `src/Kernel.php` after this change:```phpclass Kernel extends BaseKernel{ use MicroKernelTrait; protected function configureContainer(ContainerConfigurator $container): void { $container->import('../config/{packages}/*.yaml'); $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); $container->import('../config/services.yaml'); $container->import('../config/{services}_'.$this->environment.'.yaml'); } protected function configureRoutes(RoutingConfigurator $routes): void { $routes->import('../config/{routes}/'.$this->environment.'/*.yaml'); $routes->import('../config/{routes}/*.yaml'); $routes->import('../config/routes.yaml'); }}```Commits-------cf45eec [FrameworkBundle] Allow using a ContainerConfigurator in MicroKernelTrait::configureContainer()
Uh oh!
There was an error while loading.Please reload this page.
A lot to be done here after the implementation is accepted:
Ping@Tobion ,@nicolas-grekas .