public function load($resource, $type = null): void
    {
        $path = $this->locator->locate($resource);

        /** @var mixed[]|null $content */
        $content = $this->loadFile($path);
        $this->container->fileExists($path);

        // empty file
        if ($content === null) {
            return;
        }

        // imports: $this->parseImports($content, $path);
        $this->privatesCaller->callPrivateMethod($this, 'parseImports', $content, $path);

        // parameters
        if (isset($content[self::PARAMETERS_KEY])) {
            $this->ensureParametersIsArray($content, $path);

            foreach ($content[self::PARAMETERS_KEY] as $key => $value) {
                // $this->resolveServices($value, $path, true),
                $resolvedValue = $this->privatesCaller->callPrivateMethod(
                    $this,
                    'resolveServices',
                    $value,
                    $path,
                    true
                );

                // only this section is different
                if ($this->container->hasParameter($key)) {
                    $newValue = $this->parametersMerger->merge(
                        $resolvedValue,
                        $this->container->getParameter($key)
                    );

                    $this->container->setParameter($key, $newValue);
                } else {
                    $this->container->setParameter($key, $resolvedValue);
                }
            }
        }

        // extensions: $this->loadFromExtensions($content);
        $this->privatesCaller->callPrivateMethod($this, 'loadFromExtensions', $content);

        /**
         * services - not accessible, private parent properties, luckily not needed
         * - $this->anonymousServicesCount = 0;
         * - $this->anonymousServicesSuffix = ContainerBuilder::hash($path);
         */
        $this->setCurrentDir(dirname($path));
        try {
            // $this->parseDefinitions($content, $path);
            $this->privatesCaller->callPrivateMethod($this, 'parseDefinitions', $content, $path);
        } finally {
            $this->instanceof = [];
        }
    }
public function load($resource, $type = null): void
    {
        $path = $this->locator->locate($resource);

        /** @var mixed[]|null $content */
        $content = $this->loadFile($path);
        $this->container->fileExists($path);

        // empty file
        if ($content === null) {
            return;
        }

        // imports: $this->parseImports($content, $path);
        $this->privatesCaller->callPrivateMethod($this, 'parseImports', $content, $path);

        // parameters
        if (isset($content[self::PARAMETERS_KEY])) {
            $this->ensureParametersIsArray($content, $path);

            foreach ($content[self::PARAMETERS_KEY] as $key => $value) {
                // $this->resolveServices($value, $path, true),
                $resolvedValue = $this->privatesCaller->callPrivateMethod(
                    $this,
                    'resolveServices',
                    $value,
                    $path,
                    true
                );

                // only this section is different
                if ($this->container->hasParameter($key)) {
                    $newValue = $this->parametersMerger->merge(
                        $resolvedValue,
                        $this->container->getParameter($key)
                    );

                    $this->container->setParameter($key, $newValue);
                } else {
                    $this->container->setParameter($key, $resolvedValue);
                }
            }
        }

        // extensions: $this->loadFromExtensions($content);
        $this->privatesCaller->callPrivateMethod($this, 'loadFromExtensions', $content);

        /**
         * services - not accessible, private parent properties, luckily not needed
         * - $this->anonymousServicesCount = 0;
         * - $this->anonymousServicesSuffix = ContainerBuilder::hash($path);
         */
        $this->setCurrentDir(dirname($path));
        try {
            // $this->parseDefinitions($content, $path);
            $this->privatesCaller->callPrivateMethod($this, 'parseDefinitions', $content, $path);
        } finally {
            $this->instanceof = [];
        }
    }
public function load ( $ resource , $ type = null ) : void { $ path = $ this -> locator -> locate ( $ resource ) ; /** @var mixed[]|null $content */ $ content = $ this -> loadFile ( $ path ) ; $ this -> container -> fileExists ( $ path ) ; // empty file if ( $ content === null ) { return ; } // imports: $this->parseImports($content, $path); $ this -> privatesCaller -> callPrivateMethod ( $ this , 'parseImports' , $ content , $ path ) ; // parameters if ( isset ( $ content [ self :: PARAMETERS_KEY ] ) ) { $ this -> ensureParametersIsArray ( $ content , $ path ) ; foreach ( $ content [ self :: PARAMETERS_KEY ] as $ key => $ value ) { // $this->resolveServices($value, $path, true), $ resolvedValue = $ this -> privatesCaller -> callPrivateMethod ( $ this , 'resolveServices' , $ value , $ path , true ) ; // only this section is different if ( $ this -> container -> hasParameter ( $ key ) ) { $ newValue = $ this -> parametersMerger -> merge ( $ resolvedValue , $ this -> container -> getParameter ( $ key ) ) ; $ this -> container -> setParameter ( $ key , $ newValue ) ; } else { $ this -> container -> setParameter ( $ key , $ resolvedValue ) ; } } } // extensions: $this->loadFromExtensions($content); $ this -> privatesCaller -> callPrivateMethod ( $ this , 'loadFromExtensions' , $ content ) ; /**
         * services - not accessible, private parent properties, luckily not needed
         * - $this->anonymousServicesCount = 0;
         * - $this->anonymousServicesSuffix = ContainerBuilder::hash($path);
         */ $ this -> setCurrentDir ( dirname ( $ path ) ) ; try { // $this->parseDefinitions($content, $path); $ this -> privatesCaller -> callPrivateMethod ( $ this , 'parseDefinitions' , $ content , $ path ) ; } finally { $ this -> instanceof = [ ] ; } }
Same as parent, just merging parameters instead overriding them

@see https://github.com/Symplify/Symplify/pull/697

@param mixed $resource
@param string|null $type
Same as parent just merging parameters instead overriding them