From f4d1a22b9522683acbe84f26c56eac81de826a76 Mon Sep 17 00:00:00 2001 From: Tony Hegyes Date: Mon, 29 Jun 2026 10:10:57 +0200 Subject: [PATCH] fix(core): make get_feature_classes's return docblock scoper-safe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The @return used an absolute …\Feature\FeatureInterface FQCN inside the class-string generic, which php-scoper does not rewrite in docblocks — so a scoped consumer's get_feature_classes() implementation is analysed against the unscoped interface and fails static analysis, forcing a per-consumer @phpstan-ignore. Import FeatureInterface and reference the short name (as every other class-string docblock in the package already does); php-scoper rewrites the use statement, so the scoped return type resolves to the scoped interface and consumers need no workaround. Assisted-by: Claude Code:claude-opus-4-8 --- packages/core/src/PluginInterface.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/PluginInterface.php b/packages/core/src/PluginInterface.php index 72bad82..8647e5e 100644 --- a/packages/core/src/PluginInterface.php +++ b/packages/core/src/PluginInterface.php @@ -2,6 +2,7 @@ namespace DeepWebSolutions\Framework\Core; +use DeepWebSolutions\Framework\Core\Feature\FeatureInterface; use DeepWebSolutions\Framework\Core\Installer\InstallerInterface; use DeepWebSolutions\Framework\Core\ValueObjects\PluginHeader; use Psr\Container\ContainerInterface; @@ -57,7 +58,7 @@ public function get_container(): ContainerInterface; * @since 2.0.0 * @version 2.0.0 * - * @return list> + * @return list> */ public function get_feature_classes(): array;