exists('composer.lock')) { return; } $composerLockContents = file_get_contents('composer.lock'); if (preg_match('#"php":.*(5\.6)#', $composerLockContents)) { static::fixDependenciesFor55(); } } protected static function fixDependenciesFor55() { $fs = new Filesystem(); $status = 0; $fs->remove('composer.lock'); // Composer has already read our composer.json file, so we will // need to run in a new process to fix things up. passthru('composer install --ansi', $status); // Don't continue with the initial 'composer install' command exit($status); } }