diff --git a/composer-unused.php b/composer-unused.php index d932812..bfc8c9d 100644 --- a/composer-unused.php +++ b/composer-unused.php @@ -6,9 +6,8 @@ use ComposerUnused\ComposerUnused\Configuration\NamedFilter; return static function (Configuration $config): Configuration { - // These packages are consumed via Deployer's recipe loading mechanism, - // not through PHP `use`/autoload, so composer-unused cannot detect them. + // deployer-extended is consumed via Deployer's recipe loading mechanism, + // not through PHP `use`/autoload, so composer-unused cannot detect it. return $config - ->addNamedFilter(NamedFilter::fromString('deployer/deployer')) ->addNamedFilter(NamedFilter::fromString('sourcebroker/deployer-extended')); }; diff --git a/composer.json b/composer.json index f1b58bc..c83b0fd 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "php": "^8.1", "ext-json": "*", "ext-pcre": "*", - "deployer/deployer": "^7.0", - "sourcebroker/deployer-extended": "^24.0", + "deployer/deployer": "^7.0 || ^8.0", + "sourcebroker/deployer-extended": "^24.2", "sourcebroker/deployer-loader": "^5.0" }, "require-dev": { diff --git a/src/Utility/VarUtility.php b/src/Utility/VarUtility.php index 0e25ac9..61db8b7 100644 --- a/src/Utility/VarUtility.php +++ b/src/Utility/VarUtility.php @@ -21,7 +21,7 @@ public static function getDatabaseVarByType(string $var = 'password'): string|bo { $var = ucfirst($var); $type = get('app_type'); - $functionName = "\Deployer\getDatabase{$var}For" . ucfirst($type); + $functionName = "\Deployer\getDatabase{$var}For" . ucfirst((string) $type); require_once(__DIR__ . "/../../deployer/$type/task/deploy_database.php"); if (function_exists($functionName)) { return call_user_func($functionName);