How run my php class and artisan command after complete my package installation ? in my research composer script attribute do this for me but in my package not working this.
"Shipu\\Installer\\ComposerScripts::addFile", this is wrong.
When you create a command inside your package, there is a place to register the command, and you give a name to it. Something like mypackage::myaction.
The "post-install-cmd" at composer should be with that command instead of this namespace you're using...
Composer post-x-cmd are fired like normal console commands. You should register your class as an artisan command and then use composer scripts to call them.
@TheNodi no i don't want to make artisan comman... Are you sure Composer post-x-cmd are fired like normal console commands ?..... Please have a look in laravel composer.
So commonly used with shell script that I've never seen you can use static functions.
What kind of error does it gives you?
Can you show your installer code? You probably cannot use most laravel functions (laravel isn't bootstrapped).
From composer documentation the method must be static and it'll receive an instance of Composer\EventDispatcher\Event (a subclass depending on the action). Nothing else seems required.
Try to run it manually to see if you get some debug information: