fortress-project / folk-bundle

Folk's user bundle for Symfony
GNU General Public License v3.0
2 stars 0 forks source link

Services aren't loaded #1

Closed alwaeles closed 4 years ago

alwaeles commented 4 years ago

Describe the bug The services aren't loaded as shown in php bin/console debug:container

To Reproduce Steps to reproduce the behavior:

  1. Create a Symfony project : composer create-project symfony/skeleton . in an empty folder
  2. Require this bundle : composer require fortress-project/folk-bundle@dev
  3. Run php bin/console debug:container
  4. Find out there isn't any service loaded from the bundle

Expected behaviour Being able to see the services from the bundle.

Additional context None.

alwaeles commented 4 years ago

This bug is caused by the missing service configuration.

Should add src/Resources/config/service.yaml and the following code in src/DependencyInjection/FortressFolkExtension.php:

public function load(array $configs, ContainerBuilder $container)
{
    $loader = new XmlFileLoader(
        $container,
        new FileLocator(__DIR__.'/../Resources/config')
    );
    $loader->load('services.xml');

    // ...
}
alwaeles commented 4 years ago

Services are now loaded!