2021-02-15 13:07:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Composer\Json\JsonFile;
|
|
|
|
use Composer\InstalledVersions;
|
|
|
|
use Composer\Script\Event;
|
|
|
|
|
|
|
|
class Hooks
|
|
|
|
{
|
|
|
|
public static function preUpdate(Event $event)
|
|
|
|
{
|
2021-02-17 22:21:18 +00:00
|
|
|
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");
|
2021-02-15 13:07:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function postUpdate(Event $event)
|
|
|
|
{
|
2021-02-17 22:21:18 +00:00
|
|
|
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");
|
2021-02-15 13:07:58 +00:00
|
|
|
}
|
|
|
|
}
|