Skip to content

Commit d2445f9

Browse files
committed
Merge pull request symfony#1860 from bamarni/2.0
[Dependency Injection] small changes
2 parents 255726b + 1aa9e7e commit d2445f9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/dependency_injection/advanced.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,18 @@ the service itself gets loaded. To do so, you can use the ``file`` directive.
107107
services:
108108
foo:
109109
class: Example\Foo\Bar
110-
file: "%kernel.root_dir%/src/path/to/file/foo.php"
110+
file: "%app.root_dir%/src/path/to/file/foo.php"
111111
112112
.. code-block:: xml
113113
114114
<service id="foo" class="Example\Foo\Bar">
115-
<file>%kernel.root_dir%/src/path/to/file/foo.php</file>
115+
<file>%app.root_dir%/src/path/to/file/foo.php</file>
116116
</service>
117117
118118
.. code-block:: php
119119
120120
$definition = new Definition('Example\Foo\Bar');
121-
$definition->setFile('%kernel.root_dir%/src/path/to/file/foo.php');
121+
$definition->setFile('%app.root_dir%/src/path/to/file/foo.php');
122122
$container->setDefinition('foo', $definition);
123123
124124
Notice that symfony will internally call the PHP function require_once

components/dependency_injection/compilation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ worlds though by using configuration files and then dumping and caching the resu
334334
configuration. The ``PhpDumper`` makes dumping the compiled container easy::
335335

336336
use Symfony\Component\DependencyInjection\ContainerBuilder;
337-
use Symfony\Component\DependencyInjection\Dumper\PhpDumper
337+
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
338338

339339
$file = __DIR__ .'/cache/container.php';
340340

0 commit comments

Comments
 (0)