file = realpath("${directory}/composer.lock"); } public function parse() { $lockPackages = $this->contents['packages']; $lockDevPackages = $this->contents['packages-dev']; $lockPlatform = $this->contents['platform']; array_walk($lockPlatform, function (&$requirement, $component) { $requirement = [ 'name' => $component, 'version' => $requirement, ]; }); $this->run = array_merge($lockPackages, $lockPlatform); $this->dev = array_merge($lockDevPackages, $lockPlatform); } }