Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
62.50% covered (warning)
62.50%
10 / 16
CRAP
94.72% covered (success)
94.72%
323 / 341
XmlFileLoader
0.00% covered (danger)
0.00%
0 / 1
62.50% covered (warning)
62.50%
10 / 16
162.72
94.72% covered (success)
94.72%
323 / 341
 load
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
13 / 13
 supports
100.00% covered (success)
100.00%
1 / 1
4
100.00% covered (success)
100.00%
5 / 5
 parseParameters
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
3 / 3
 parseImports
0.00% covered (danger)
0.00%
0 / 1
5.03
88.89% covered (warning)
88.89%
8 / 9
 parseDefinitions
0.00% covered (danger)
0.00%
0 / 1
12.02
94.59% covered (success)
94.59%
35 / 37
 getServiceDefaults
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
6 / 6
 parseDefinition
0.00% covered (danger)
0.00%
0 / 1
56
97.12% covered (success)
97.12%
101 / 104
 parseFileToDOM
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
5 / 5
 processAnonymousServices
100.00% covered (success)
100.00%
1 / 1
8
100.00% covered (success)
100.00%
22 / 22
 getArgumentsAsPhp
0.00% covered (danger)
0.00%
0 / 1
32.32
88.89% covered (warning)
88.89%
64 / 72
 getChildren
100.00% covered (success)
100.00%
1 / 1
5
100.00% covered (success)
100.00%
5 / 5
 validateSchema
0.00% covered (danger)
0.00%
0 / 1
12.08
91.67% covered (success)
91.67%
33 / 36
 validateAlias
0.00% covered (danger)
0.00%
0 / 1
7.07
88.89% covered (warning)
88.89%
8 / 9
 validateExtensions
100.00% covered (success)
100.00%
1 / 1
6
100.00% covered (success)
100.00%
6 / 6
 loadFromExtensions
100.00% covered (success)
100.00%
1 / 1
5
100.00% covered (success)
100.00%
8 / 8
 convertDomElementToArray
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
<?php
/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\Config\Util\XmlUtils;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
use Symfony\Component\DependencyInjection\Argument\BoundArgument;
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\ExpressionLanguage\Expression;
/**
 * XmlFileLoader loads XML files service definitions.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class XmlFileLoader extends FileLoader
{
    const NS = 'http://symfony.com/schema/dic/services';
    protected $autoRegisterAliasesForSinglyImplementedInterfaces = false;
    /**
     * {@inheritdoc}
     */
    public function load($resource, string $type = null)
    {
        $path = $this->locator->locate($resource);
        $xml = $this->parseFileToDOM($path);
        $this->container->fileExists($path);
        $defaults = $this->getServiceDefaults($xml, $path);
        // anonymous services
        $this->processAnonymousServices($xml, $path);
        // imports
        $this->parseImports($xml, $path);
        // parameters
        $this->parseParameters($xml, $path);
        // extensions
        $this->loadFromExtensions($xml);
        // services
        try {
            $this->parseDefinitions($xml, $path, $defaults);
        } finally {