• 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

Confirm Leave on External Links in Wordpress

XML to CSV with PHP converter [problem with images grabing]

Currently Using CodeIgniter Framework i have an Error

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

IlluminateDatabaseQueryException: SQLSTATE[HY000]: General error: 1 no such table - In clone project

How do I enable error reporting in Laravel?

how to youtube api data to print in toolset metabox using a button click before save-post

WooCommerce - unset "<product> removed notice…" on cart page

Display a success custom notice after Placing an Order in WooCommerce

How can I pass the list to the component variable in Laravel?

Add Class in html Dynamically in PHP

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

How to add a custom field to all Woocommerce attribute terms using add_action

The "client_reference_id" argument is not passed

Laravel after login Two factor not working

About Contact Privacy policy Terms and conditions