Skip to content

Fix some paths #13132

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

Merged
merged 1 commit into from
Feb 14, 2020
Merged
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
24 changes: 12 additions & 12 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ the common configuration using options when importing the routes.

# config/routes/annotations.yaml
controllers:
resource: '../src/Controller/'
resource: '../../src/Controller/'
type: annotation
# this is added to the beginning of all imported route URLs
prefix: '/blog'
Expand All @@ -1175,7 +1175,7 @@ the common configuration using options when importing the routes.
# Uncomment this option to make that URL "/blog" instead
# trailing_slash_on_root: false
# you can optionally exclude some files/subdirectories when loading annotations
# exclude: '../src/Controller/{DebugEmailController}.php'
# exclude: '../../src/Controller/{DebugEmailController}.php'

.. code-block:: xml

Expand All @@ -1191,18 +1191,18 @@ the common configuration using options when importing the routes.
the 'name-prefix' value is added to the beginning of all imported route names
the 'exclude' option defines the files or subdirectories ignored when loading annotations
-->
<import resource="../src/Controller/"
<import resource="../../src/Controller/"
type="annotation"
prefix="/blog"
name-prefix="blog_"
exclude="../src/Controller/{DebugEmailController}.php">
exclude="../../src/Controller/{DebugEmailController}.php">
<!-- these requirements are added to all imported routes -->
<requirement key="_locale">en|es|fr</requirement>
</import>

<!-- An imported route with an empty URL will become "/blog/"
Uncomment this option to make that URL "/blog" instead -->
<import resource="../src/Controller/" type="annotation"
<import resource="../../src/Controller/" type="annotation"
prefix="/blog"
trailing-slash-on-root="false">
<!-- ... -->
Expand All @@ -1217,7 +1217,7 @@ the common configuration using options when importing the routes.
return function (RoutingConfigurator $routes) {
// use the optional fifth argument of import() to exclude some files
// or subdirectories when loading annotations
$routes->import('../src/Controller/', 'annotation')
$routes->import('../../src/Controller/', 'annotation')
// this is added to the beginning of all imported route URLs
->prefix('/blog')
// An imported route with an empty URL will become "/blog/"
Expand Down Expand Up @@ -1737,7 +1737,7 @@ with a locale. This can be done by defining a different prefix for each locale

# config/routes/annotations.yaml
controllers:
resource: '../src/Controller/'
resource: '../../src/Controller/'
type: annotation
prefix:
en: '' # don't prefix URLs for English, the default locale
Expand All @@ -1752,7 +1752,7 @@ with a locale. This can be done by defining a different prefix for each locale
xsi:schemaLocation="http://symfony.com/schema/routing
https://symfony.com/schema/routing/routing-1.0.xsd">

<import resource="../src/Controller/" type="annotation">
<import resource="../../src/Controller/" type="annotation">
<!-- don't prefix URLs for English, the default locale -->
<prefix locale="en"></prefix>
<prefix locale="nl">/nl</prefix>
Expand All @@ -1765,7 +1765,7 @@ with a locale. This can be done by defining a different prefix for each locale
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

return function (RoutingConfigurator $routes) {
$routes->import('../src/Controller/', 'annotation')
$routes->import('../../src/Controller/', 'annotation')
->prefix([
// don't prefix URLs for English, the default locale
'en' => '',
Expand Down Expand Up @@ -2156,7 +2156,7 @@ defined as annotations:

# config/routes/annotations.yaml
controllers:
resource: '../src/Controller/'
resource: '../../src/Controller/'
type: annotation
defaults:
schemes: [https]
Expand All @@ -2170,7 +2170,7 @@ defined as annotations:
xsi:schemaLocation="http://symfony.com/schema/routing
https://symfony.com/schema/routing/routing-1.0.xsd">

<import resource="../src/Controller/" type="annotation">
<import resource="../../src/Controller/" type="annotation">
<default key="schemes">HTTPS</default>
</import>
</routes>
Expand All @@ -2181,7 +2181,7 @@ defined as annotations:
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

return function (RoutingConfigurator $routes) {
$routes->import('../src/Controller/', 'annotation')
$routes->import('../../src/Controller/', 'annotation')
->schemes(['https'])
;
};
Expand Down