diff --git a/Resources/doc/index.rst b/Resources/doc/index.rst index 8e51d3e..0741d6c 100644 --- a/Resources/doc/index.rst +++ b/Resources/doc/index.rst @@ -406,25 +406,38 @@ First, add a new ``PSR-4`` autoload-entry in the ``composer.json`` with the new "autoload-dev": { "psr-4": { "...": "...", - "DataFixtures\\": "fixtures" + "DataFixtures\\": "fixtures/" } }, -Then, enable Dependency Injection for the ``fixtures`` directory: +.. note:: -.. code-block:: php + You need to dump the autoloader with ``composer dump-autoloader`` - // config/services.php - namespace Symfony\Component\DependencyInjection\Loader\Configurator; +Then, enable Dependency Injection for the ``fixtures`` directory: - return function(ContainerConfigurator $container) : void { - $services = $container->services() - ->defaults() - ->autowire() - ->autoconfigure(); +.. configuration-block:: - $services->load('DataFixtures\\', '../fixtures'); - }; + .. code-block:: yaml + + # config/services.yaml + services: + DataFixtures\: + resource: '../fixtures' + + .. code-block:: php + + // config/services.php + namespace Symfony\Component\DependencyInjection\Loader\Configurator; + + return function(ContainerConfigurator $container) : void { + $services = $container->services() + ->defaults() + ->autowire() + ->autoconfigure(); + + $services->load('DataFixtures\\', '../fixtures'); + }; .. caution::