Skip to content

Commit 5e3730d

Browse files
committed
remove skip-package-deployment flag
- we now have the "none" deploy method - also all unit tests still work, so we maybe did not break something
1 parent 155ae7c commit 5e3730d

File tree

2 files changed

+13
-34
lines changed

2 files changed

+13
-34
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ magento-composer-installer deploy the packages. So this can be disabled:
276276
"extra":{
277277
"magento-root-dir": "htdocs/",
278278
"modman-root-dir": ".modman",
279-
"skip-package-deployment": true
279+
"magento-deploystrategy": "none"
280280
}
281281
...
282282
}

src/MagentoHackathon/Composer/Magento/Installer.php

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ class Installer extends LibraryInstaller implements InstallerInterface
3838
*/
3939
protected $isForced = false;
4040

41-
/**
42-
* If set the package will not be deployed (with any DeployStrategy)
43-
* Using a modman-root-dir is not supported yet but the modman-DeployStrategy so you might want to use the normal
44-
* modman script for this
45-
*
46-
* @var bool
47-
*/
48-
protected $skipPackageDeployment = false;
49-
5041
/**
5142
* The module's base directory
5243
*
@@ -115,10 +106,6 @@ public function __construct(IOInterface $io, Composer $composer, $type = 'magent
115106
if (isset($extra['magento-deploystrategy'])) {
116107
$this->setDeployStrategy((string)$extra['magento-deploystrategy']);
117108
}
118-
119-
if (!empty($extra['skip-package-deployment'])) {
120-
$this->skipPackageDeployment = true;
121-
}
122109
}
123110

124111
/**
@@ -213,11 +200,9 @@ public function install(InstalledRepositoryInterface $repo, PackageInterface $pa
213200
{
214201
parent::install($repo, $package);
215202

216-
if (!$this->skipPackageDeployment) {
217-
$strategy = $this->getDeployStrategy($package);
218-
$strategy->setMappings($this->getParser($package)->getMappings());
219-
$strategy->deploy();
220-
}
203+
$strategy = $this->getDeployStrategy($package);
204+
$strategy->setMappings($this->getParser($package)->getMappings());
205+
$strategy->deploy();
221206
}
222207

223208
/**
@@ -232,19 +217,15 @@ public function install(InstalledRepositoryInterface $repo, PackageInterface $pa
232217
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
233218
{
234219

235-
if (!$this->skipPackageDeployment) {
236-
$initialStrategy = $this->getDeployStrategy($initial);
237-
$initialStrategy->setMappings($this->getParser($initial)->getMappings());
238-
$initialStrategy->clean();
239-
}
220+
$initialStrategy = $this->getDeployStrategy($initial);
221+
$initialStrategy->setMappings($this->getParser($initial)->getMappings());
222+
$initialStrategy->clean();
240223

241224
parent::update($repo, $initial, $target);
242225

243-
if (!$this->skipPackageDeployment) {
244-
$targetStrategy = $this->getDeployStrategy($target);
245-
$targetStrategy->setMappings($this->getParser($target)->getMappings());
246-
$targetStrategy->deploy();
247-
}
226+
$targetStrategy = $this->getDeployStrategy($target);
227+
$targetStrategy->setMappings($this->getParser($target)->getMappings());
228+
$targetStrategy->deploy();
248229
}
249230

250231
/**
@@ -255,11 +236,9 @@ public function update(InstalledRepositoryInterface $repo, PackageInterface $ini
255236
*/
256237
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
257238
{
258-
if (!$this->skipPackageDeployment) {
259-
$strategy = $this->getDeployStrategy($package);
260-
$strategy->setMappings($this->getParser($package)->getMappings());
261-
$strategy->clean();
262-
}
239+
$strategy = $this->getDeployStrategy($package);
240+
$strategy->setMappings($this->getParser($package)->getMappings());
241+
$strategy->clean();
263242

264243
parent::uninstall($repo, $package);
265244
}

0 commit comments

Comments
 (0)