I want do create a composer-package that moves part of it's content into the directory containing the main composer.json
-file.
At first I though about a simple post-installation script that could be hooked into composers installation procedure via "scripts" : { "post-package-install":"MyScript"}
. But these scripts are only called when they are defined in the main composer.json
. And I don't have access to that.
So my next idea was to use a custom installer. It took me some time to get through the concept and I'm sure I am missing something fundamental. As the custom-Installer (Installer) is a requirement to my package that contains the files that shall be moved (Package) the Installer is installed and executed before the Package. Therefore I have no chance of moving the contents of the Package somewhere as the package is not yet available.
Is there a possibility to accomplish that somehow?
If you need code-examples drop me a line, but at the moment I'm more stuck at how to do it anyway.
Thanks for any help!