File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
+ ## [ 1.1.1] - 2022-06-02
11
+
12
+ ### Fixed
13
+ - Improved compatibility when both wireframe-framework/processwire-composer-installer and hari/pw-module are enabled.
14
+
10
15
## [ 1.1.0] - 2020-12-09
11
16
12
17
### Added
Original file line number Diff line number Diff line change 3
3
namespace wireframe \ComposerInstaller ;
4
4
5
5
use Composer \Composer ;
6
+ use Composer \DependencyResolver \Operation \UpdateOperation ;
6
7
use Composer \EventDispatcher \EventSubscriberInterface ;
7
8
use Composer \IO \IOInterface ;
8
9
use Composer \Plugin \PluginInterface ;
@@ -43,6 +44,9 @@ public static function getSubscribedEvents()
43
44
PackageEvents::PRE_PACKAGE_INSTALL => [
44
45
array ('prePackageInstall ' , 0 )
45
46
],
47
+ PackageEvents::PRE_PACKAGE_UPDATE => [
48
+ array ('prePackageInstall ' , 0 )
49
+ ],
46
50
];
47
51
}
48
52
@@ -57,7 +61,8 @@ public static function getSubscribedEvents()
57
61
*/
58
62
public static function prePackageInstall (PackageEvent $ event )
59
63
{
60
- $ package = $ event ->getOperation ()->getPackage ();
64
+ $ operation = $ event ->getOperation ();
65
+ $ package = $ operation instanceof UpdateOperation ? $ operation ->getTargetPackage () : $ operation ->getPackage ();
61
66
if ($ package ->getType () !== 'pw-module ' ) return ;
62
67
$ installationManager = $ event ->getComposer ()->getInstallationManager ();
63
68
$ moduleInstaller = $ installationManager ->getInstaller ('pw-module ' );
You can’t perform that action at this time.
0 commit comments