private function prepareAutoloadPaths(
        string $mergeSection,
        array $packageComposerJson,
        SmartFileInfo $packageFile
    ): array {
        if (! in_array($mergeSection, ['autoload', 'autoload-dev'], true)) {
            return $packageComposerJson;
        }

        foreach ($this->sectionsWithPath as $sectionWithPath) {
            if (! isset($packageComposerJson[$mergeSection][$sectionWithPath])) {
                continue;
            }

            $packageComposerJson[$mergeSection][$sectionWithPath] = $this->relativizePath(
                $packageComposerJson[$mergeSection][$sectionWithPath],
                $packageFile
            );
        }

        return $packageComposerJson;
    }
private function prepareAutoloadPaths(
        string $mergeSection,
        array $packageComposerJson,
        SmartFileInfo $packageFile
    ): array {
        if (! in_array($mergeSection, ['autoload', 'autoload-dev'], true)) {
            return $packageComposerJson;
        }

        foreach ($this->sectionsWithPath as $sectionWithPath) {
            if (! isset($packageComposerJson[$mergeSection][$sectionWithPath])) {
                continue;
            }

            $packageComposerJson[$mergeSection][$sectionWithPath] = $this->relativizePath(
                $packageComposerJson[$mergeSection][$sectionWithPath],
                $packageFile
            );
        }

        return $packageComposerJson;
    }
private function prepareAutoloadPaths ( string $ mergeSection , array $ packageComposerJson , SmartFileInfo $ packageFile ) : array { if ( ! in_array ( $ mergeSection , [ 'autoload' , 'autoload-dev' ] , true ) ) { return $ packageComposerJson ; } foreach ( $ this -> sectionsWithPath as $ sectionWithPath ) { if ( ! isset ( $ packageComposerJson [ $ mergeSection ] [ $ sectionWithPath ] ) ) { continue ; } $ packageComposerJson [ $ mergeSection ] [ $ sectionWithPath ] = $ this -> relativizePath ( $ packageComposerJson [ $ mergeSection ] [ $ sectionWithPath ] , $ packageFile ) ; } return $ packageComposerJson ; }
Class map path needs to be prefixed before merge, otherwise will override one another
@see https://github.com/Symplify/Symplify/issues/1333
@param mixed[] $packageComposerJson
@return mixed[]
Class map path needs to be prefixed before merge otherwise will override one another