src/Sulu/Component/Util/SuluVersionPass.php
private function getSuluVersion($dir)
    {
        $version = '_._._';

        /** @var SplFileInfo $composerFile */
        $composerFile = new SplFileInfo($dir . '/composer.lock', '', '');
        if (!$composerFile->isFile()) {
            return $version;
        }

        $composer = json_decode($composerFile->getContents(), true);
        foreach ($composer['packages'] as $package) {
            if ('sulu/sulu' === $package['name']) {
                return $package['version'];
            }
        }

        return $version;
    }
private function getSuluVersion($dir)
    {
        $version = '_._._';

        /** @var SplFileInfo $composerFile */
        $composerFile = new SplFileInfo($dir . '/composer.lock', '', '');
        if (!$composerFile->isFile()) {
            return $version;
        }

        $composer = json_decode($composerFile->getContents(), true);
        foreach ($composer['packages'] as $package) {
            if ('sulu/sulu' === $package['name']) {
                return $package['version'];
            }
        }

        return $version;
    }
private function getSuluVersion ( $ dir ) { $ version = '_._._' ; /** @var SplFileInfo $composerFile */ $ composerFile = new SplFileInfo ( $ dir . '/composer.lock' , '' , '' ) ; if ( ! $ composerFile -> isFile ( ) ) { return $ version ; } $ composer = json_decode ( $ composerFile -> getContents ( ) , true ) ; foreach ( $ composer [ 'packages' ] as $ package ) { if ( 'sulu/sulu' === $ package [ 'name' ] ) { return $ package [ 'version' ] ; } } return $ version ; }
Read composer.lock file and return version of sulu.

@param string $dir

@return string
Read composer . lock file and return version of sulu .