File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
wcfsetup/install/files/lib Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace wcf \event \package ;
4+
5+ use wcf \data \package \Package ;
6+ use wcf \event \IPsr14Event ;
7+
8+ /**
9+ * Indicates that a package uninstallation has been started but no data has been
10+ * removed so far.
11+ *
12+ * @author Alexander Ebert
13+ * @copyright 2001-2025 WoltLab GmbH
14+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
15+ * @since 6.2
16+ */
17+ final class PackageUninstallationStarted implements IPsr14Event
18+ {
19+ public function __construct (
20+ public readonly Package $ package
21+ ) {}
22+ }
Original file line number Diff line number Diff line change 88use wcf \system \application \ApplicationHandler ;
99use wcf \system \cache \builder \PackageCacheBuilder ;
1010use wcf \command \cache \ClearCache ;
11+ use wcf \data \package \PackageCache ;
12+ use wcf \event \package \PackageUninstallationStarted ;
1113use wcf \system \event \EventHandler ;
1214use wcf \system \package \plugin \IPackageInstallationPlugin ;
1315use wcf \system \setup \Uninstaller ;
@@ -59,6 +61,11 @@ public function uninstall(string $node): PackageInstallationStep
5961 switch ($ data ['nodeType ' ]) {
6062 case 'start ' :
6163 $ step = $ this ->handleStartMarker ($ nodeData );
64+
65+ $ package = PackageCache::getInstance ()->getPackage ($ this ->queue ->packageID );
66+ \assert ($ package !== null );
67+ $ event = new PackageUninstallationStarted ($ package );
68+ EventHandler::getInstance ()->fire ($ event );
6269 break ;
6370
6471 case 'package ' :
You can’t perform that action at this time.
0 commit comments