From 0de838a4df708eaeda360a36225f00df9121097a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Thu, 16 Mar 2023 22:25:46 +0100 Subject: [PATCH] fix(composer): detect if TopFloor is installed --- composer.json | 1 + src/ParentPlugin.php | 52 ++++++++++++++++++++++++++++++++++++++++++++ src/Plugin.php | 7 +++++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 src/ParentPlugin.php diff --git a/composer.json b/composer.json index 3dcb146..4252bd1 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ }, "require": { "composer-plugin-api": "^2.3", + "picocms/pico": "*", "topfloor/composer-cleanup-vcs-dirs": "^1.1" }, "replace": { diff --git a/src/ParentPlugin.php b/src/ParentPlugin.php new file mode 100644 index 0000000..df0598a --- /dev/null +++ b/src/ParentPlugin.php @@ -0,0 +1,52 @@ +composer = $composer; $this->io = $io; + if (!self::IS_TOP_FLOOR_PLUGIN){ + // do nothing + return ; + } $this->handler = new Handler($composer, $io); try { list('config' => $config,'path' => $path) = $this->getConfigJsonFile();