Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #16477 [Routing] Changing RouteCollectionBuilder::import() behavi…
…or to add to the builder (weaverryan) This PR was squashed before being merged into the 2.8 branch (closes #16477). Discussion ---------- [Routing] Changing RouteCollectionBuilder::import() behavior to add to the builder | Q | A | ------------- | --- | Bug fix? | behavior change | New feature? | behavior change | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Based on conversation starting here: #15990 (comment). ```php // Before: $routes->mount('/admin', $routes->import(__DIR__.'/config/admin.yml'); // After: $routes->import(__DIR__.'/config/admin.yml', '/admin'); ``` This makes `import()` actually add the `RouteCollectionBuilder` into itself. We didn't do this before at Fabien's request, and actually the current implementation (before this PR) is quite "clean". However, I agree with @wouterj that `import()` really sounds/looks like it will actually *import* those routes *into* this `RouteCollectionBuilder`. This change is subjective - we just need to pick which way we like better and run full steam with it. Commits ------- 8feb9ef [Routing] Changing RouteCollectionBuilder::import() behavior to add to the builder
- Loading branch information