tshevchenko / installer
installer for laravel packages
v1.0
2024-04-28 14:04 UTC
Requires
- php: ^8.1
- composer-plugin-api: ^2.0
- laravel/framework: ^11.0
This package is not auto-updated.
Last update: 2025-01-05 16:36:15 UTC
README
Package to handle custom composer installer actions
Installation
composer require tshevchenko/installer
add functions to the root composer.json scripts
"scripts": {
"post-autoload-dump": [
"Tshevchenko\\Installer\\Installer::postAutoloadDump"
],
"post-package-install": [
"Tshevchenko\\Installer\\Installer::postInstallEvent"
],
"pre-package-uninstall": [
"Tshevchenko\\Installer\\Installer::preUninstallEvent"
]
}
Using in the packages
package type="tshevchenko-package"
add needed actions to the package composer.json extra
"extra": {
"Tshevchenko\\Installer\\Installer::postInstallEvent": {
"callArtisan": [
[
"migrate",
"test-command:test testOption",
"vendor:publish --tag=public --force"
]
]
},
"Tshevchenko\\Installer\\Installer::preUninstallEvent": {
"callArtisan": [
[
"migrate:rollback"
]
]
}
}