Skip to content

Commit 3db1ee8

Browse files
minor #25115 [*Bundle] Replace some kernel.root_dir by kernel.project_dir (nicolas-grekas, xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- [*Bundle] Replace some kernel.root_dir by kernel.project_dir | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 92fc2f7 remove more kernel.root_dir parameter refs 4add28b [*Bundle] Replace some kernel.root_dir by kernel.project_dir
2 parents 6a055a8 + 3bc8f2e commit 3db1ee8

File tree

11 files changed

+27
-27
lines changed

11 files changed

+27
-27
lines changed

Resources/config/templating_php.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<service id="templating.helper.code" class="Symfony\Bundle\FrameworkBundle\Templating\Helper\CodeHelper">
5353
<tag name="templating.helper" alias="code" />
5454
<argument type="service" id="debug.file_link_formatter"></argument>
55-
<argument>%kernel.root_dir%</argument>
55+
<argument>%kernel.project_dir%</argument>
5656
<argument>%kernel.charset%</argument>
5757
</service>
5858

Tests/DependencyInjection/Fixtures/php/full.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
'enabled' => false,
2222
),
2323
'router' => array(
24-
'resource' => '%kernel.root_dir%/config/routing.xml',
24+
'resource' => '%kernel.project_dir%/config/routing.xml',
2525
'type' => 'xml',
2626
),
2727
'session' => array(
@@ -54,7 +54,7 @@
5454
'translator' => array(
5555
'enabled' => true,
5656
'fallback' => 'fr',
57-
'paths' => array('%kernel.root_dir%/Fixtures/translations'),
57+
'paths' => array('%kernel.project_dir%/Fixtures/translations'),
5858
),
5959
'validation' => array(
6060
'enabled' => true,

Tests/DependencyInjection/Fixtures/php/serializer_mapping.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
'enable_annotations' => true,
77
'mapping' => array(
88
'paths' => array(
9-
'%kernel.root_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/files',
10-
'%kernel.root_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yml',
11-
'%kernel.root_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yaml',
9+
'%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/files',
10+
'%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yml',
11+
'%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yaml',
1212
),
1313
),
1414
),

Tests/DependencyInjection/Fixtures/php/validation_mapping.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
'validation' => array(
55
'mapping' => array(
66
'paths' => array(
7-
'%kernel.root_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/files',
8-
'%kernel.root_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yml',
9-
'%kernel.root_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yaml',
7+
'%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/files',
8+
'%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yml',
9+
'%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yaml',
1010
),
1111
),
1212
),

Tests/DependencyInjection/Fixtures/xml/full.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<framework:esi enabled="true" />
1515
<framework:ssi enabled="true" />
1616
<framework:profiler only-exceptions="true" enabled="false" />
17-
<framework:router resource="%kernel.root_dir%/config/routing.xml" type="xml" />
17+
<framework:router resource="%kernel.project_dir%/config/routing.xml" type="xml" />
1818
<framework:session gc-maxlifetime="90000" gc-probability="1" gc-divisor="108" storage-id="session.storage.native" handler-id="session.handler.native_file" name="_SYMFONY" cookie-lifetime="86400" cookie-path="/" cookie-domain="example.com" cookie-secure="true" cookie-httponly="false" use-cookies="true" save-path="/path/to/sessions" />
1919
<framework:request>
2020
<framework:format name="csv">
@@ -37,7 +37,7 @@
3737
</framework:templating>
3838
<framework:assets version="v1" />
3939
<framework:translator enabled="true" fallback="fr" logging="true">
40-
<framework:path>%kernel.root_dir%/Fixtures/translations</framework:path>
40+
<framework:path>%kernel.project_dir%/Fixtures/translations</framework:path>
4141
</framework:translator>
4242
<framework:validation enabled="true" />
4343
<framework:annotations cache="file" debug="true" file-cache-dir="%kernel.cache_dir%/annotations" />

Tests/DependencyInjection/Fixtures/xml/serializer_mapping.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<framework:annotations enabled="true" />
99
<framework:serializer enable-annotations="true">
1010
<framework:mapping>
11-
<framework:path>%kernel.root_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/files</framework:path>
12-
<framework:path>%kernel.root_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yml</framework:path>
13-
<framework:path>%kernel.root_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yaml</framework:path>
11+
<framework:path>%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/files</framework:path>
12+
<framework:path>%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yml</framework:path>
13+
<framework:path>%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yaml</framework:path>
1414
</framework:mapping>
1515
</framework:serializer>
1616
</framework:config>

Tests/DependencyInjection/Fixtures/xml/validation_mapping.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<framework:config>
88
<framework:validation>
99
<framework:mapping>
10-
<framework:path>%kernel.root_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/files</framework:path>
11-
<framework:path>%kernel.root_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yml</framework:path>
12-
<framework:path>%kernel.root_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yaml</framework:path>
10+
<framework:path>%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/files</framework:path>
11+
<framework:path>%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yml</framework:path>
12+
<framework:path>%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yaml</framework:path>
1313
</framework:mapping>
1414
</framework:validation>
1515
</framework:config>

Tests/DependencyInjection/Fixtures/yml/full.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ framework:
1414
only_exceptions: true
1515
enabled: false
1616
router:
17-
resource: '%kernel.root_dir%/config/routing.xml'
17+
resource: '%kernel.project_dir%/config/routing.xml'
1818
type: xml
1919
session:
2020
storage_id: session.storage.native
@@ -42,8 +42,8 @@ framework:
4242
translator:
4343
enabled: true
4444
fallback: fr
45-
default_path: '%kernel.root_dir%/translations'
46-
paths: ['%kernel.root_dir%/Fixtures/translations']
45+
default_path: '%kernel.project_dir%/translations'
46+
paths: ['%kernel.project_dir%/Fixtures/translations']
4747
validation:
4848
enabled: true
4949
annotations:

Tests/DependencyInjection/Fixtures/yml/serializer_mapping.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ framework:
55
enable_annotations: true
66
mapping:
77
paths:
8-
- "%kernel.root_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/files"
9-
- "%kernel.root_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yml"
10-
- "%kernel.root_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yaml"
8+
- "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/files"
9+
- "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yml"
10+
- "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yaml"

Tests/DependencyInjection/Fixtures/yml/validation_mapping.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ framework:
22
validation:
33
mapping:
44
paths:
5-
- "%kernel.root_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/files"
6-
- "%kernel.root_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yml"
7-
- "%kernel.root_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yaml"
5+
- "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/files"
6+
- "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yml"
7+
- "%kernel.project_dir%/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yaml"

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public function testRouter()
322322

323323
$this->assertTrue($container->has('router'), '->registerRouterConfiguration() loads routing.xml');
324324
$arguments = $container->findDefinition('router')->getArguments();
325-
$this->assertEquals($container->getParameter('kernel.root_dir').'/config/routing.xml', $container->getParameter('router.resource'), '->registerRouterConfiguration() sets routing resource');
325+
$this->assertEquals($container->getParameter('kernel.project_dir').'/config/routing.xml', $container->getParameter('router.resource'), '->registerRouterConfiguration() sets routing resource');
326326
$this->assertEquals('%router.resource%', $arguments[1], '->registerRouterConfiguration() sets routing resource');
327327
$this->assertEquals('xml', $arguments[2]['resource_type'], '->registerRouterConfiguration() sets routing resource type');
328328
}

0 commit comments

Comments
 (0)