Composer Script echo
PHP Snippet 1:
<?php
declare(strict_types=1);
namespace MyApp\Composer;
use Composer\Script\Event;
class ScriptHandler
{
public static function myScript(Event $event): void
{
// Your script here
}
}
PHP Snippet 2:
public static function myScript(Event $event): void
{
$event->getIO()->write('foo'):
}
PHP Snippet 3:
"scripts": {
"post-update-cmd": [
"MyApp\\Composer\\ScriptHandler::myScript"
]
}