4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\DependencyInjection\Compiler;
14 use Symfony\Component\DependencyInjection\ContainerBuilder;
17 * Removes abstract Definitions.
19 class RemoveAbstractDefinitionsPass implements CompilerPassInterface
22 * Removes abstract definitions from the ContainerBuilder.
24 public function process(ContainerBuilder $container)
26 foreach ($container->getDefinitions() as $id => $definition) {
27 if ($definition->isAbstract()) {
28 $container->removeDefinition($id);
29 $container->log($this, sprintf('Removed service "%s"; reason: abstract.', $id));