Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Fix missing constants in ScriptEvents in composer v2 (#28)
Browse files Browse the repository at this point in the history
* Fix missing constants in ScriptEvents in composer v2

- Composer v2 no longer uses constants in getSubscribedEvents method

* Update composer.json

* Update composer.json

---------

Co-authored-by: Barry vd. Heuvel <barryvdh@gmail.com>
  • Loading branch information
kranack and barryvdh authored Aug 5, 2023
1 parent e123550 commit 973cab9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
],
"require": {
"composer-plugin-api": "^2.0"
},
},
"require-dev": {
"composer/composer": "^2.0"
},
"autoload": {
"psr-4": {
"Barryvdh\\Composer\\": "src/"
Expand Down
8 changes: 2 additions & 6 deletions src/CleanupPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,8 @@ public function uninstall(Composer $composer, IOInterface $io)
public static function getSubscribedEvents()
{
return array(
ScriptEvents::POST_PACKAGE_INSTALL => array(
array('onPostPackageInstall', 0)
),
ScriptEvents::POST_PACKAGE_UPDATE => array(
array('onPostPackageUpdate', 0)
),
'post-package-install' => 'onPostPackageInstall',
'post-package-update' => 'onPostPackageUpdate',
/*ScriptEvents::POST_INSTALL_CMD => array(
array('onPostInstallUpdateCmd', 0)
),
Expand Down

0 comments on commit 973cab9

Please sign in to comment.