From a0df09270c63db98aa5c70ffea29d0f541c4493a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D1=96=D0=B9?= <61122611+CrazyTapok-bit@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:19:07 +0300 Subject: [PATCH] Add PackageInstaller --- composer.json | 4 ++- src/PackageInstaller.php | 57 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/PackageInstaller.php diff --git a/composer.json b/composer.json index 69d85bd..868efb3 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,9 @@ ], "scripts": { "test": "phpunit --colors=always", - "analyze": "phpstan analyze --ansi" + "analyze": "phpstan analyze --ansi", + "post-package-install": "TgWebValid\\PackageInstaller::postPackageInstall", + "post-package-uninstall": "TgWebValid\\PackageInstaller::postPackageUninstall" }, "require": { "php": "^8.2", diff --git a/src/PackageInstaller.php b/src/PackageInstaller.php new file mode 100644 index 0000000..03e3cd4 --- /dev/null +++ b/src/PackageInstaller.php @@ -0,0 +1,57 @@ +