Merge pull request #735 from ajshort/composer-installer-multiple
Support multiple installers in a composer-installer package.main
commit
1127cd5c8a
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Installer;
|
||||
|
||||
use Composer\Installer\InstallerInterface;
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Repository\InstalledRepositoryInterface;
|
||||
|
||||
class Custom1 implements InstallerInterface
|
||||
{
|
||||
public $name = 'custom1';
|
||||
public $version = 'installer-v4';
|
||||
|
||||
public function supports($packageType) {}
|
||||
public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) {}
|
||||
public function install(InstalledRepositoryInterface $repo, PackageInterface $package) {}
|
||||
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) {}
|
||||
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) {}
|
||||
public function getInstallPath(PackageInterface $package) {}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Installer;
|
||||
|
||||
use Composer\Installer\InstallerInterface;
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Repository\InstalledRepositoryInterface;
|
||||
|
||||
class Custom2 implements InstallerInterface
|
||||
{
|
||||
public $name = 'custom2';
|
||||
public $version = 'installer-v4';
|
||||
|
||||
public function supports($packageType) {}
|
||||
public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) {}
|
||||
public function install(InstalledRepositoryInterface $repo, PackageInterface $package) {}
|
||||
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) {}
|
||||
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) {}
|
||||
public function getInstallPath(PackageInterface $package) {}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "",
|
||||
"version": "4.0.0",
|
||||
"type": "composer-installer",
|
||||
"autoload": { "psr-0": { "Installer": "" } },
|
||||
"extra": {
|
||||
"class": [
|
||||
"Installer\\Custom1",
|
||||
"Installer\\Custom2"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue