Skip to content

[Routing] Use fourth argument of RoutingConfigurator instead of non-existent method #15773

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,11 @@ the common configuration using options when importing the routes.
return function (RoutingConfigurator $routes) {
// use the optional fourth argument of import() to exclude some files
// or subdirectories when loading annotations
$routes->import('../../src/Controller/', 'annotation')
$routes->import(
resource: '../../src/Controller/',
type: 'annotation',
exclude: '../../src/Controller/{DebugEmailController}.php'
)
// this is added to the beginning of all imported route URLs
->prefix('/blog')

Expand All @@ -1260,9 +1264,6 @@ the common configuration using options when importing the routes.

// these requirements are added to all imported routes
->requirements(['_locale' => 'en|es|fr'])

// you can optionally exclude some files/subdirectories when loading annotations
->exclude('../../src/Controller/{DebugEmailController}.php')
;
};

Expand Down