File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -20,5 +20,6 @@ When does this plugin update EasyAdmin classes?
20
20
21
21
* Just after installing this Composer plugin;
22
22
* Just after installing or updating any EasyAdmin version.
23
+ * Just after running ` composer update ` or ` composer install ` commands.
23
24
24
25
[ 1 ] : https://easycorp.github.io/blog/posts/the-road-to-easyadmin-3-no-more-inheritance
Original file line number Diff line number Diff line change 12
12
use Composer \IO \IOInterface ;
13
13
use Composer \Package \PackageInterface ;
14
14
use Composer \Plugin \PluginInterface ;
15
+ use Composer \Script \Event ;
16
+ use Composer \Script \ScriptEvents ;
15
17
16
18
final class NoFinalClassPlugin implements PluginInterface, EventSubscriberInterface
17
19
{
@@ -27,6 +29,8 @@ public static function getSubscribedEvents()
27
29
return [
28
30
PackageEvents::POST_PACKAGE_INSTALL => 'onPackageInstall ' ,
29
31
PackageEvents::POST_PACKAGE_UPDATE => 'onPackageUpdate ' ,
32
+ ScriptEvents::POST_INSTALL_CMD => 'onInstallCmd ' ,
33
+ ScriptEvents::POST_UPDATE_CMD => 'onUpdateCmd ' ,
30
34
];
31
35
}
32
36
@@ -56,6 +60,16 @@ public function onPackageUpdate(PackageEvent $event)
56
60
$ this ->removeFinalFromAllEasyAdminClasses ();
57
61
}
58
62
63
+ public function onInstallCmd (Event $ event )
64
+ {
65
+ $ this ->removeFinalFromAllEasyAdminClasses ();
66
+ }
67
+
68
+ public function onUpdateCmd (Event $ event )
69
+ {
70
+ $ this ->removeFinalFromAllEasyAdminClasses ();
71
+ }
72
+
59
73
public function removeFinalFromAllEasyAdminClasses ()
60
74
{
61
75
$ vendorDirPath = $ this ->getVendorDirPath ();
You can’t perform that action at this time.
0 commit comments