diff --git a/components/dependency_injection/advanced.rst b/components/dependency_injection/advanced.rst index 5c9eafd21e4..e0fa3ea81d6 100644 --- a/components/dependency_injection/advanced.rst +++ b/components/dependency_injection/advanced.rst @@ -107,18 +107,18 @@ the service itself gets loaded. To do so, you can use the ``file`` directive. services: foo: class: Example\Foo\Bar - file: "%kernel.root_dir%/src/path/to/file/foo.php" + file: "%app.root_dir%/src/path/to/file/foo.php" .. code-block:: xml - %kernel.root_dir%/src/path/to/file/foo.php + %app.root_dir%/src/path/to/file/foo.php .. code-block:: php $definition = new Definition('Example\Foo\Bar'); - $definition->setFile('%kernel.root_dir%/src/path/to/file/foo.php'); + $definition->setFile('%app.root_dir%/src/path/to/file/foo.php'); $container->setDefinition('foo', $definition); Notice that symfony will internally call the PHP function require_once diff --git a/components/dependency_injection/compilation.rst b/components/dependency_injection/compilation.rst index b4783616682..1d0d2c4ff16 100644 --- a/components/dependency_injection/compilation.rst +++ b/components/dependency_injection/compilation.rst @@ -334,7 +334,7 @@ worlds though by using configuration files and then dumping and caching the resu configuration. The ``PhpDumper`` makes dumping the compiled container easy:: use Symfony\Component\DependencyInjection\ContainerBuilder; - use Symfony\Component\DependencyInjection\Dumper\PhpDumper + use Symfony\Component\DependencyInjection\Dumper\PhpDumper; $file = __DIR__ .'/cache/container.php';