PHPackages                             pug/installer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pug/installer

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

pug/installer
=============

Enable installation callbacks on composer libraries

1.0.1(5y ago)285.6k↓30%3MITPHPPHP &gt;=5.3.0CI failing

Since Jul 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/pug-php/installer)[ Packagist](https://packagist.org/packages/pug/installer)[ GitHub Sponsors](https://github.com/kylekatarnls)[ Fund](https://opencollective.com/pug-php)[ RSS](/packages/pug-installer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (4)Versions (7)Used By (3)

Pug Installer
=============

[](#pug-installer)

[![Latest Stable Version](https://camo.githubusercontent.com/0b8f68bfef9d146866e97aac6218def3812e46aff002dbe092001bd4d8259999/68747470733a2f2f706f7365722e707567782e6f72672f7075672f696e7374616c6c65722f762f737461626c652e706e67)](https://packagist.org/packages/pug/installer)[![Build Status](https://camo.githubusercontent.com/5054e85f0fa3a9bf7b9b8f1f65605e1991dfeced9869c7a6265042b2e57585bc/68747470733a2f2f7472617669732d63692e6f72672f7075672d7068702f696e7374616c6c65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pug-php/installer)[![StyleCI](https://camo.githubusercontent.com/a5f8b241cacc0ca58ff31397a7a75276f4d7c7db7525db144740092cd2215f1e/68747470733a2f2f7374796c6563692e696f2f7265706f732f39373133313637332f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/97131673)[![Test Coverage](https://camo.githubusercontent.com/c8a996ca1195b48d45adef2939be92300b1526c9f444d6012abed12bd6998ea4/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7075672d7068702f696e7374616c6c65722f6261646765732f636f7665726167652e737667)](https://codecov.io/github/pug-php/installer?branch=master)[![Code Climate](https://camo.githubusercontent.com/466c9e05b0343f2e01564b5fbff27d8e1531d2d27e9ab70b69fb702ef48b0264/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7075672d7068702f696e7374616c6c65722f6261646765732f6770612e737667)](https://codeclimate.com/github/pug-php/installer)

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

Usage
-----

[](#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).

```
