mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Remove plugin installer hackery
This commit is contained in:
parent
7267533690
commit
f7e8f7625f
10 changed files with 39 additions and 61 deletions
|
@ -8,16 +8,15 @@ class Hooks
|
|||
{
|
||||
public static function preUpdate(Event $event)
|
||||
{
|
||||
flush();
|
||||
echo '!!PreUpdate:'.JsonFile::encode(InstalledVersions::getInstalledPackages(), 320)."\n";
|
||||
echo '!!Versions:console:'.InstalledVersions::getVersion('symfony/console').';process:'.InstalledVersions::getVersion('symfony/process').';filesystem:'.InstalledVersions::getVersion('symfony/filesystem')."\n";
|
||||
fwrite(STDERR, '!!PreUpdate:'.JsonFile::encode(InstalledVersions::getInstalledPackages(), 320)."\n");
|
||||
fwrite(STDERR, '!!Versions:console:'.InstalledVersions::getVersion('symfony/console').';process:'.InstalledVersions::getVersion('symfony/process').';filesystem:'.InstalledVersions::getVersion('symfony/filesystem')."\n");
|
||||
}
|
||||
|
||||
public static function postUpdate(Event $event)
|
||||
{
|
||||
echo '!!PostUpdate:'.JsonFile::encode(InstalledVersions::getInstalledPackages(), 320)."\n";
|
||||
echo '!!Versions:console:'.InstalledVersions::getVersion('symfony/console').';process:'.InstalledVersions::getVersion('symfony/process').';filesystem:'.InstalledVersions::getVersion('symfony/filesystem')."\n";
|
||||
echo '!!PluginA:'.InstalledVersions::getVersion('plugin/a')."\n";
|
||||
echo '!!PluginB:'.InstalledVersions::getVersion('plugin/b')."\n";
|
||||
fwrite(STDERR, '!!PostUpdate:'.JsonFile::encode(InstalledVersions::getInstalledPackages(), 320)."\n");
|
||||
fwrite(STDERR, '!!Versions:console:'.InstalledVersions::getVersion('symfony/console').';process:'.InstalledVersions::getVersion('symfony/process').';filesystem:'.InstalledVersions::getVersion('symfony/filesystem')."\n");
|
||||
fwrite(STDERR, '!!PluginA:'.InstalledVersions::getVersion('plugin/a')."\n");
|
||||
fwrite(STDERR, '!!PluginB:'.InstalledVersions::getVersion('plugin/b')."\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,8 @@ class PluginA implements PluginInterface
|
|||
{
|
||||
public function activate(Composer $composer, IOInterface $io)
|
||||
{
|
||||
echo '!!PluginA:'.InstalledVersions::getVersion('plugin/a').JsonFile::encode(InstalledVersions::getInstalledPackages(), 320)."\n";
|
||||
echo '!!PluginAInit'.JsonFile::encode(InstalledVersions::getInstalledPackages(), 320)."\n";
|
||||
echo '!!PluginA:'.(InstalledVersions::isInstalled('plugin/a') ? InstalledVersions::getVersion('plugin/a') : 'null')."\n";
|
||||
echo '!!PluginB:'.(InstalledVersions::isInstalled('plugin/b') ? InstalledVersions::getVersion('plugin/b') : 'null')."\n";
|
||||
echo '!!Versions:console:'.InstalledVersions::getVersion('symfony/console').';process:'.InstalledVersions::getVersion('symfony/process').';filesystem:'.InstalledVersions::getVersion('symfony/filesystem')."\n";
|
||||
}
|
||||
|
|
|
@ -10,8 +10,9 @@ class PluginB implements PluginInterface
|
|||
{
|
||||
public function activate(Composer $composer, IOInterface $io)
|
||||
{
|
||||
echo '!!PluginB:'.InstalledVersions::getVersion('plugin/b').JsonFile::encode(InstalledVersions::getInstalledPackages(), 320)."\n";
|
||||
echo '!!PluginBInit'.JsonFile::encode(InstalledVersions::getInstalledPackages(), 320)."\n";
|
||||
echo '!!PluginA:'.(InstalledVersions::isInstalled('plugin/a') ? InstalledVersions::getVersion('plugin/a') : 'null')."\n";
|
||||
echo '!!PluginB:'.(InstalledVersions::isInstalled('plugin/b') ? InstalledVersions::getVersion('plugin/b') : 'null')."\n";
|
||||
echo '!!Versions:console:'.InstalledVersions::getVersion('symfony/console').';process:'.InstalledVersions::getVersion('symfony/process').';filesystem:'.InstalledVersions::getVersion('symfony/filesystem')."\n";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue