Skip to content

Commit 155ae7c

Browse files
committed
implement parser map overwrite
1 parent 6a72c15 commit 155ae7c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/MagentoHackathon/Composer/Magento/Installer.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,18 @@ public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $
273273
public function getParser(PackageInterface $package)
274274
{
275275
$extra = $package->getExtra();
276+
$moduleSpecificMap = $this->composer->getPackage()->getExtra();
277+
if( isset($moduleSpecificMap['magento-map-overwrite']) ){
278+
$moduleSpecificMap = $moduleSpecificMap['magento-map-overwrite'];
279+
if( isset($moduleSpecificMap[$package->getName()]) ){
280+
$map = $moduleSpecificMap[$package->getName()];
281+
}
282+
}
276283

277-
if (isset($extra['map'])) {
284+
if (isset($map)) {
285+
$parser = new MapParser($map);
286+
return $parser;
287+
} elseif (isset($extra['map'])) {
278288
$parser = new MapParser($extra['map']);
279289
return $parser;
280290
} elseif (isset($extra['package-xml'])) {

0 commit comments

Comments
 (0)