staempfli/composer-installer

A simple composer installer

This package's canonical repository appears to be gone and the package has been frozen as a result.

Installs: 2 485

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 7

Forks: 0

Open Issues: 0

Type:composer-installer

0.1.4 2016-04-20 08:12 UTC

This package is auto-updated.

Last update: 2020-09-15 17:59:43 UTC


README

Magento Composer Installer based on AOEpeople/composer-installers

Description

This Composer installer is an adapted version of the AOEpeople/composer-installers so it fit our needs for deploying our Magento Projects.

Adaptions

It already provides the location paths as we need them, so no extra configuration is needed in project composer files.

protected $locations = array(
    'module'    => 'magento/.modman/{$name}/',
    'source'    => 'magento/'
);

It handles Magento version upgrades by backup the current magento installation before removing the directory, so no data is lost and can be restored if needed.

    if($package->getType() === 'magento-source') {
        $installPath    = $this->getInstallPath($package);
        $backupDate     = date('YmdHi');
        $backupPath     = $installPath . '_' . $backupDate;

        $this->filesystem->copyThenRemove($installPath, $backupPath);
        $this->io->write(sprintf('Backup %s - %s', $backupPath, is_dir($backupPath) ? '<comment>created</comment>' : '<error>not created</error>'));
    } else {
        $repo->removePackage($package);
        $installPath = $this->getInstallPath($package);
        $this->io->write(sprintf('Deleting %s - %s', $installPath, $this->filesystem->removeDirectory($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
    }

Support

If you have any issues with this extension, open an issue on GitHub.

Contribution

Any contribution is highly appreciated. The best way to contribute code is to open a pull request on GitHub.

Developer

Staempfli Webteam and all other contributors

License

GNU General Public License, version 3 (GPLv3)

Copyright

(c) 2015, Stämpfli AG