|  Download Mushroom Hook ManagerComposer plugin for running post-install/post-update scripts of your project's dependencies Using in your packagePossible example: Create file MushroomHooks.phpin the root of you package source directory with such content: <?php
namespace Your\Package\Namespace;
class MushroomHooks
{
    public static function afterInstall($params)
    {
        // some actions on after install your package...
    }
    public static function afterUpdate($params)
    {
        // some actions on after update your package...
    }
}
 Next add this lines to your package's composer.jsonfile: ...
"require": {
    "smoren/mushroom-hook-manager": "1.0.0",
    ...
},
...
"extra": {
    ...
    "mushroom-use-hooks": true,
    "mushroom-hooks": {
        "after-install": [
            "Your\\Package\\Namespace\\MushroomHooks::afterInstall"
        ],
        "after-update": [
            "Your\\Package\\Namespace\\MushroomHooks::afterUpdate"
        ]
    }
}
...
 You can also pass some params to package's hooks in your project
(as arguments for methods afterInstallandafterUpdate). Example for your project'scomposer.jsonfile: ...
"extra": {
    ...
    "mushroom-hooks-params": {
        "your-composer/package-name": {
            "after-install": {
                "some-param": 1,
                "another-param": 2
            },
            "after-update": {
                "foo": "bar"
            }
        }
    }
}
...
 |