composer->getPackage()->getExtra(); if (empty($extra['patches'])) { return; } $this->io->write(' - Resolving patches from root package.'); foreach ($this->findPatchesInJson($extra['patches']) as $package => $patches) { foreach ($patches as $patch) { /** @var Patch $patch */ $patch->extra['provenance'] = "root"; $collection->addPatch($patch); } } } }