2021-02-12 10:12:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Composer\Json\JsonFile;
|
|
|
|
use Composer\InstalledVersions;
|
|
|
|
use Composer\Script\Event;
|
|
|
|
|
|
|
|
class Hooks
|
|
|
|
{
|
|
|
|
public static function preUpdate(Event $event)
|
|
|
|
{
|
2021-03-10 13:34:26 +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-12 10:12:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function postUpdate(Event $event)
|
|
|
|
{
|
2021-03-10 13:34:26 +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");
|
2021-02-12 10:12:42 +00:00
|
|
|
}
|
|
|
|
}
|