• 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

WordPress Subquery returns more than 1 row on SELECT

Uploading video to Youtube using Youtube Data API V3 and Google API Client PHP -- getting 401 (unauthorized) message

add " ? " in url via htaccess RewriteRule

Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables 11 [closed]

Return multiple values from a function using mysqli_fetch_assoc [closed]

Log a user out of a website when they put their computer to sleep

PHP how to detect if running on arm64 cpu?

WooCommerce Subscriptions: Remove role on cancelled subscription

how to insert data into select2 search input after scan using qrcode

How to get monthly wise data in laravel

Having trouble with PDO queries (Notice: Undefined index)

Why does using salted hash on python and php give me different results?

json_encode turns array into an object

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

Laravel 5.1 how to use {{ old('') }} helper on blade file for radio inputs

About Contact Privacy policy Terms and conditions