2021-02-15 13:07:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Composer\Plugin\PluginInterface;
|
|
|
|
use Composer\Composer;
|
|
|
|
use Composer\IO\IOInterface;
|
|
|
|
use Composer\Json\JsonFile;
|
|
|
|
use Composer\InstalledVersions;
|
|
|
|
|
|
|
|
class PluginB implements PluginInterface
|
|
|
|
{
|
|
|
|
public function activate(Composer $composer, IOInterface $io)
|
|
|
|
{
|
2021-02-17 22:21:18 +00:00
|
|
|
echo '!!PluginBInit'.JsonFile::encode(InstalledVersions::getInstalledPackages(), 320)."\n";
|
2021-02-15 13:07:58 +00:00
|
|
|
echo '!!PluginA:'.(InstalledVersions::isInstalled('plugin/a') ? InstalledVersions::getVersion('plugin/a') : 'null')."\n";
|
2021-02-17 22:21:18 +00:00
|
|
|
echo '!!PluginB:'.(InstalledVersions::isInstalled('plugin/b') ? InstalledVersions::getVersion('plugin/b') : 'null')."\n";
|
2021-02-15 13:07:58 +00:00
|
|
|
echo '!!Versions:console:'.InstalledVersions::getVersion('symfony/console').';process:'.InstalledVersions::getVersion('symfony/process').';filesystem:'.InstalledVersions::getVersion('symfony/filesystem')."\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
public function deactivate(Composer $composer, IOInterface $io)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function uninstall(Composer $composer, IOInterface $io)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|