Builds a Symfony container from a collection of service files found in different directories The service files themselves can be written in different formats (yml, xml, ini or php)
This builder will compile all of those files to one format (yml, xml, ini or php)
Find all services.xml, services.ini, services.yml, services.php files on a directory, write result as out.xml
php bin/build container:build out.xml /path/to/your/project
php bin/build container:build out.xml xml -d /path/to/your/project -l services.xml -f path/to/custom1.xml, /path/to/custom2.xml
php bin/build container:build out.xml xml -d /path/to/your/project -l services.xml -p MyCompilerpass.php
IMPORTANT: As we can't handle whatever you pass into a compiler pass constructor, every compiler pass you have must extend to LDLAbstractCompilerPass
For using compiler pass priority and type, make your compiler pass extends to LDLAbstractCompilerPass
<?php
use LDL\DependencyInjection\CompilerPass\LDLAbstractCompilerPass;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class MyCompilerPass extends LDLAbstractCompilerPass
{
public function getPriority() : int
{
return 0;
}
public function getType() : string
{
return PassConfig::TYPE_OPTIMIZE;
}
public function process(ContainerBuilder $container)
{
// Implement process() method.
}
}
- Add excluded files and directories to command