Skip to content

Commit 6dc4742

Browse files
committed
minor #7829 replace kernel.root_dir with kernel.project_dir (xabbuh, javiereguiluz)
This PR was merged into the master branch. Discussion ---------- replace kernel.root_dir with kernel.project_dir see #7768 Commits ------- 3c0ba11 Fixed a path b49da4a replace kernel.root_dir with kernel.project_dir
2 parents 01d2fd4 + 3c0ba11 commit 6dc4742

19 files changed

+70
-70
lines changed

assetic/yuicompressor.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ stylesheets:
3838
# java: '/usr/bin/java'
3939
filters:
4040
yui_css:
41-
jar: '%kernel.root_dir%/Resources/java/yuicompressor.jar'
41+
jar: '%kernel.project_dir%/app/Resources/java/yuicompressor.jar'
4242
yui_js:
43-
jar: '%kernel.root_dir%/Resources/java/yuicompressor.jar'
43+
jar: '%kernel.project_dir%/app/Resources/java/yuicompressor.jar'
4444
4545
.. code-block:: xml
4646
@@ -57,10 +57,10 @@ stylesheets:
5757
<assetic:config>
5858
<assetic:filter
5959
name="yui_css"
60-
jar="%kernel.root_dir%/Resources/java/yuicompressor.jar" />
60+
jar="%kernel.project_dir%/app/Resources/java/yuicompressor.jar" />
6161
<assetic:filter
6262
name="yui_js"
63-
jar="%kernel.root_dir%/Resources/java/yuicompressor.jar" />
63+
jar="%kernel.project_dir%/app/Resources/java/yuicompressor.jar" />
6464
</assetic:config>
6565
</container>
6666
@@ -71,10 +71,10 @@ stylesheets:
7171
// 'java' => '/usr/bin/java',
7272
'filters' => array(
7373
'yui_css' => array(
74-
'jar' => '%kernel.root_dir%/Resources/java/yuicompressor.jar',
74+
'jar' => '%kernel.project_dir%/app/Resources/java/yuicompressor.jar',
7575
),
7676
'yui_js' => array(
77-
'jar' => '%kernel.root_dir%/Resources/java/yuicompressor.jar',
77+
'jar' => '%kernel.project_dir%/app/Resources/java/yuicompressor.jar',
7878
),
7979
),
8080
));

bundles/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ The output will look like this:
125125
use_controller:
126126
enabled: '%kernel.debug%'
127127
profiler: false
128-
read_from: '%kernel.root_dir%/../web'
128+
read_from: '%kernel.project_dir%/web'
129129
write_to: '%assetic.read_from%'
130130
java: /usr/bin/java
131131
node: /usr/local/bin/node

components/dependency_injection/_imports-parameters-note.rst.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# app/config/config.yml
1212
imports:
13-
- { resource: '%kernel.root_dir%/parameters.yml' }
13+
- { resource: '%kernel.project_dir%/app/parameters.yml' }
1414

1515
.. code-block:: xml
1616

@@ -22,11 +22,11 @@
2222
http://symfony.com/schema/dic/services/services-1.0.xsd">
2323

2424
<imports>
25-
<import resource="%kernel.root_dir%/parameters.yml" />
25+
<import resource="%kernel.project_dir%/app/parameters.yml" />
2626
</imports>
2727
</container>
2828

2929
.. code-block:: php
3030

3131
// app/config/config.php
32-
$loader->import('%kernel.root_dir%/parameters.yml');
32+
$loader->import('%kernel.project_dir%/app/parameters.yml');

configuration.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The main configuration file is called ``config.yml``:
2525
2626
framework:
2727
secret: '%secret%'
28-
router: { resource: '%kernel.root_dir%/config/routing.yml' }
28+
router: { resource: '%kernel.project_dir%/app/config/routing.yml' }
2929
# ...
3030
3131
# Twig Configuration
@@ -57,7 +57,7 @@ The main configuration file is called ``config.yml``:
5757
</imports>
5858
5959
<framework:config secret="%secret%">
60-
<framework:router resource="%kernel.root_dir%/config/routing.xml" />
60+
<framework:router resource="%kernel.project_dir%/app/config/routing.xml" />
6161
<!-- ... -->
6262
</framework:config>
6363
@@ -77,7 +77,7 @@ The main configuration file is called ``config.yml``:
7777
$container->loadFromExtension('framework', array(
7878
'secret' => '%secret%',
7979
'router' => array(
80-
'resource' => '%kernel.root_dir%/config/routing.php',
80+
'resource' => '%kernel.project_dir%/app/config/routing.php',
8181
),
8282
// ...
8383
));

configuration/configuration_organization.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class::
2323

2424
public function registerContainerConfiguration(LoaderInterface $loader)
2525
{
26-
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
26+
$loader->load($this->getProjectDir().'/app/config/config_'.$this->getEnvironment().'.yml');
2727
}
2828
}
2929

@@ -99,7 +99,7 @@ method::
9999

100100
public function registerContainerConfiguration(LoaderInterface $loader)
101101
{
102-
$loader->load($this->getRootDir().'/config/'.$this->getEnvironment().'/config.yml');
102+
$loader->load($this->getProjectDir().'/app/config/'.$this->getEnvironment().'/config.yml');
103103
}
104104
}
105105

@@ -196,7 +196,7 @@ make Symfony aware of the new file organization::
196196

197197
public function registerContainerConfiguration(LoaderInterface $loader)
198198
{
199-
$loader->load($this->getRootDir().'/config/environments/'.$this->getEnvironment().'.yml');
199+
$loader->load($this->getProjectDir().'/app/config/environments/'.$this->getEnvironment().'.yml');
200200
}
201201
}
202202

configuration/environments.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class:
4545
4646
public function registerContainerConfiguration(LoaderInterface $loader)
4747
{
48-
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
48+
$loader->load($this->getProjectDir().'/app/config/config_'.$this->getEnvironment().'.yml');
4949
}
5050
}
5151

configuration/multiple_kernels.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ they don't collide with the files from ``AppKernel``::
101101

102102
public function registerContainerConfiguration(LoaderInterface $loader)
103103
{
104-
$loader->load($this->getRootDir().'/config/api/config_'.$this->getEnvironment().'.yml');
104+
$loader->load($this->getProjectDir().'/app/config/api/config_'.$this->getEnvironment().'.yml');
105105
}
106106
}
107107

@@ -176,7 +176,7 @@ In order to solve this issue, add the following configuration to your kernel:
176176
twig:
177177
paths:
178178
# allows to use app/Resources/views/ templates in the ApiKernel
179-
"%kernel.root_dir%/../app/Resources/views": ~
179+
"%kernel.project_dir%/app/Resources/views": ~
180180
181181
Adding more Kernels to the Application
182182
--------------------------------------

configuration/override_dir_structure.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ You also need to change the ``extra.symfony-web-dir`` option in the
135135
# ...
136136
assetic:
137137
# ...
138-
read_from: '%kernel.root_dir%/../../public_html'
138+
read_from: '%kernel.project_dir%/../public_html'
139139
140140
.. code-block:: xml
141141
@@ -150,7 +150,7 @@ You also need to change the ``extra.symfony-web-dir`` option in the
150150
http://symfony.com/schema/dic/assetic/assetic-1.0.xsd">
151151
152152
<!-- ... -->
153-
<assetic:config read-from="%kernel.root_dir%/../../public_html" />
153+
<assetic:config read-from="%kernel.project_dir%/../public_html" />
154154
</container>
155155
156156
.. code-block:: php
@@ -160,7 +160,7 @@ You also need to change the ``extra.symfony-web-dir`` option in the
160160
// ...
161161
$container->loadFromExtension('assetic', array(
162162
// ...
163-
'read_from' => '%kernel.root_dir%/../../public_html',
163+
'read_from' => '%kernel.project_dir%/../public_html',
164164
));
165165
166166
Now you just need to clear the cache and dump the assets again and your

controller/upload_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ controller to specify the directory in which the brochures should be stored:
165165
166166
# ...
167167
parameters:
168-
brochures_directory: '%kernel.root_dir%/../web/uploads/brochures'
168+
brochures_directory: '%kernel.project_dir%/web/uploads/brochures'
169169
170170
There are some important things to consider in the code of the above controller:
171171

doctrine.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ can automatically generate an empty ``test_project`` database for you:
207207
doctrine:
208208
dbal:
209209
driver: pdo_sqlite
210-
path: '%kernel.root_dir%/sqlite.db'
210+
path: '%kernel.project_dir%/app/sqlite.db'
211211
charset: UTF8
212212
213213
.. code-block:: xml
@@ -225,7 +225,7 @@ can automatically generate an empty ``test_project`` database for you:
225225
<doctrine:config>
226226
<doctrine:dbal
227227
driver="pdo_sqlite"
228-
path="%kernel.root_dir%/sqlite.db"
228+
path="%kernel.project_dir%/app/sqlite.db"
229229
charset="UTF-8" />
230230
</doctrine:config>
231231
</container>
@@ -236,7 +236,7 @@ can automatically generate an empty ``test_project`` database for you:
236236
$container->loadFromExtension('doctrine', array(
237237
'dbal' => array(
238238
'driver' => 'pdo_sqlite',
239-
'path' => '%kernel.root_dir%/sqlite.db',
239+
'path' => '%kernel.project_dir%/app/sqlite.db',
240240
'charset' => 'UTF-8',
241241
),
242242
));

0 commit comments

Comments
 (0)