PHP code example of php-arsenal / doctrine-odm-repository-service-compiler-pass

1. Go to this page and download the library: Download php-arsenal/doctrine-odm-repository-service-compiler-pass library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

php-arsenal / doctrine-odm-repository-service-compiler-pass example snippets



use PhpArsenal\DoctrineODMRepositoryServiceCompilerPass\DocumentRepositoryAutoconfigureCompilerPass;

class Kernel extends BaseKernel
{
    use MicroKernelTrait;
    
    ...
    
    protected function build(ContainerBuilder $container): void
    {
        $container->addCompilerPass(new DocumentRepositoryAutoconfigureCompilerPass());
    }
    
    ...   
}