• 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

CodeIgniter 3 is generating a session file on each request, why?

500 Internal Server Error on Ajax request. Not sure the origin of the problem

PHP array sort and remove duplicates by two field values

PHP Find Array Index value in multi-line array

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

PHP date() with timezone?

Must be of the type array, null given,

MySQL upgrade causing unexpected results on simple WHERE clauses

Laravel dosen't connect with Oracle

PHP: How to solve ob_start() in combination imagepng() issue?

How to retrieve Active Directory group policy maximum password age using LDAP

how to remove white space in select 2

Combine multiple columns into an array as one of the key in a results set

SlimExceptionHttpNotFoundException

How to loop a tree array with unknown depth and get array blocks?

About Contact Privacy policy Terms and conditions