Fix build regressions
parent
3764073b43
commit
9a6d63f0f4
|
@ -413,6 +413,9 @@ class Factory
|
|||
|
||||
$locker = new Package\Locker($io, new JsonFile($config->get('lock') ? $lockFile : Platform::getDevNull(), null, $io), $im, file_get_contents($composerFile), $process);
|
||||
$composer->setLocker($locker);
|
||||
} elseif ($composer instanceof Composer) {
|
||||
$locker = new Package\Locker($io, new JsonFile(Platform::getDevNull(), null, $io), $im, json_encode($localConfig), $process);
|
||||
$composer->setLocker($locker);
|
||||
}
|
||||
|
||||
if ($composer instanceof Composer) {
|
||||
|
|
|
@ -50,7 +50,7 @@ class PluginInstaller extends LibraryInstaller
|
|||
{
|
||||
// fail install process early if it going to fail due to a plugin not being allowed
|
||||
if ($type === 'install' || $type === 'update') {
|
||||
$this->composer->getPluginManager()->isPluginAllowed($package->getName(), false);
|
||||
$this->getPluginManager()->isPluginAllowed($package->getName(), false);
|
||||
}
|
||||
|
||||
return parent::prepare($type, $package, $prevPackage);
|
||||
|
|
|
@ -77,7 +77,7 @@ class PluginManager
|
|||
$this->versionParser = new VersionParser();
|
||||
$this->disablePlugins = $disablePlugins;
|
||||
$this->allowPluginRules = $this->parseAllowedPlugins($composer->getConfig()->get('allow-plugins'), $composer->getLocker());
|
||||
$this->allowGlobalPluginRules = $this->parseAllowedPlugins($globalComposer !== null ? $globalComposer->getConfig()->get('allow-plugins') : false, $globalComposer !== null ? $globalComposer->getLocker() : null);
|
||||
$this->allowGlobalPluginRules = $this->parseAllowedPlugins($globalComposer !== null ? $globalComposer->getConfig()->get('allow-plugins') : false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,10 +15,12 @@ namespace Composer\Test\Plugin;
|
|||
use Composer\Composer;
|
||||
use Composer\Config;
|
||||
use Composer\Installer\PluginInstaller;
|
||||
use Composer\Json\JsonFile;
|
||||
use Composer\Package\CompleteAliasPackage;
|
||||
use Composer\Package\CompletePackage;
|
||||
use Composer\Package\Loader\JsonLoader;
|
||||
use Composer\Package\Loader\ArrayLoader;
|
||||
use Composer\Package\Locker;
|
||||
use Composer\Package\RootPackage;
|
||||
use Composer\Plugin\PluginManager;
|
||||
use Composer\IO\BufferIO;
|
||||
|
@ -26,6 +28,7 @@ use Composer\EventDispatcher\EventDispatcher;
|
|||
use Composer\Autoload\AutoloadGenerator;
|
||||
use Composer\Test\TestCase;
|
||||
use Composer\Util\Filesystem;
|
||||
use Composer\Util\Platform;
|
||||
|
||||
class PluginInstallerTest extends TestCase
|
||||
{
|
||||
|
@ -123,6 +126,7 @@ class PluginInstallerTest extends TestCase
|
|||
$this->composer->setAutoloadGenerator($this->autoloadGenerator);
|
||||
$this->composer->setEventDispatcher(new EventDispatcher($this->composer, $this->io));
|
||||
$this->composer->setPackage(new RootPackage('dummy/root', '1.0.0.0', '1.0.0'));
|
||||
$this->composer->setLocker(new Locker($this->io, new JsonFile(Platform::getDevNull()), $im, '{}'));
|
||||
|
||||
$config->merge(array(
|
||||
'config' => array(
|
||||
|
|
Loading…
Reference in New Issue