pug/installer

Enable installation callbacks on composer libraries

Maintainers

👁 kylekatarn

Package info

github.com/pug-php/installer

Type:composer-plugin

pkg:composer/pug/installer

Statistics

Installs: 87 125

Dependents: 3

Suggesters: 0

Stars: 2

Open Issues: 0

1.0.1 2020-10-30 19:57 UTC

Requires

  • php: >=5.3.0
  • composer-plugin-api: ^1.0 || ^2.0

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 6add0d44f8d459730a695ec990ee92ffc86f8945

  • Kyle <kylekatarnls.woop@gmail.com>

This package is auto-updated.

Last update: 2026-06-10 18:46:43 UTC


README

👁 Latest Stable Version
👁 Build Status
👁 StyleCI
👁 Test Coverage
👁 Code Climate

Allow you to call scripts and sub-installations after package installed.

Usage

Edit composer.json like this:

...
"require": {
 "pug/installer": "*"
},
"extra": {
 "installer": "MyClass::install"
},
"scripts": {
 "post-install-cmd": [
 "Pug\\Installer\\Installer::onAutoloadDump"
 ],
 "post-update-cmd": [
 "Pug\\Installer\\Installer::onAutoloadDump"
 ]
},
...

Then in your MyClass::install method (MyClass must be available via some PSR autoload you defined in composer.json).

<?php

use Composer\Script\Event;
use Pug\Installer\Installer;

class MyClass
{
 public static install(Event $event, Installer, $installer)
 {
 $installer->install('pug/pug');
 $event->getIO()->write('pug/pug has been installed');
 }
}

The following will install pug/pug after your own package.

You can pass multiple installers like this:

"extra": {
 "installer": [
 "Foo::install",
 "Bar::install"
 ]
}