1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Add allow-plugins config value (#10314)

Fixes #5659

- Automatically switch off plugins by default in July 2022
- reword hash into object in schema

Co-authored-by: Nils Adermann <naderman@naderman.de>
This commit is contained in:
Jordi Boggiano 2021-12-07 23:00:48 +01:00 committed by GitHub
parent 04dbed27a9
commit a3e91b5be6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 249 additions and 32 deletions

View file

@ -114,16 +114,17 @@ class PluginInstallerTest extends TestCase
$this->composer->setEventDispatcher(new EventDispatcher($this->composer, $this->io));
$this->composer->setPackage(new RootPackage('dummy/root', '1.0.0.0', '1.0.0'));
$this->pm = new PluginManager($this->io, $this->composer);
$this->composer->setPluginManager($this->pm);
$config->merge(array(
'config' => array(
'vendor-dir' => $this->directory.'/Fixtures/',
'home' => $this->directory.'/Fixtures',
'bin-dir' => $this->directory.'/Fixtures/bin',
'allow-plugins' => true,
),
));
$this->pm = new PluginManager($this->io, $this->composer);
$this->composer->setPluginManager($this->pm);
}
protected function tearDown()
@ -145,7 +146,10 @@ class PluginInstallerTest extends TestCase
$plugins = $this->pm->getPlugins();
$this->assertEquals('installer-v1', $plugins[0]->version); // @phpstan-ignore-line
$this->assertEquals('activate v1'.PHP_EOL, $this->io->getOutput());
$this->assertEquals(
'activate v1'.PHP_EOL,
$this->io->getOutput()
);
}
public function testInstallMultiplePlugins()