• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Composer Script echo

phpcomposer-php


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"
    ]
}

Related Snippets

XSS attack still works despite htmlspecialchars() doing its work

Open a popup box after receiving result from ajax

Composer Warning: openssl extension is missing. How to enable in WAMP

Backend cannot be reached after Typo3 login screen

Last order would be re-order in wooCommerce. How is it possible?

Get image type from base64 encoded src string

Combining a describing and one array with data

Sort multidimensional array by column value within a column

How to render html from a @foreach loop in a textarea

insert multiple rows in a saveall in cakephp

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

How to insert data from multiple select dropdown values into database?

Symfony Mercure "Failed to send an update"

How to debug in WooCommerce 3+

Show Custom Data in Woocommerce Order Details Admin Area

About Contact Privacy policy Terms and conditions