Versions

Table Of Contents

Support

You can obtain free community support for example through stackoverflow, or also through the Symfony2 mailing list.

If you think you found a bug, please create a ticket in the bug tracker.


Continuous Inspections

If you take code quality seriously, try out the new continuous inspection service.
scrutinizer-ci.com

GitHub

Doctrine Integration

Configuration

Doctrine integration is enabled by default. However, you can easily disable it in your configuration:

jms_di_extra:
    doctrine_integration: false
<jms-di-extra doctrine-integration="false" />

Injecting Dependencies Into Repositories

If you have enabled Doctrine integration, you can now inject dependencies into repositories using annotations:

use JMS\DiExtraBundle\Annotation as DI;

class MyRepository extends EntityRepository
{
    private $uuidGenerator;

    /**
     * @DI\InjectParams({
     *     "uuidGenerator" = @DI\Inject("my_uuid_generator"),
     * })
     */
    public function setUuidGenerator(UUidGenerator $uuidGenerator)
    {
        $this->uuidGenerator = $uuidGenerator;
    }

    // ...
}
Note: If you do not want to use annotations, you can also implement Symfony\Component\DependencyInjection\ContainerAwareInterface in your repositories to receive the entire service container.