From 06f719345fe38f905f1c5aadea50f3a9ef9b2d9a Mon Sep 17 00:00:00 2001 From: "Bruno O. Notario" Date: Tue, 6 Feb 2024 12:23:22 -0300 Subject: [PATCH] Change factory pattern --- system/engine/registry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/engine/registry.php b/system/engine/registry.php index 6507fee..c61de17 100644 --- a/system/engine/registry.php +++ b/system/engine/registry.php @@ -345,7 +345,7 @@ final class Registry { if ($injectionClass === self::FACTORY_CLASS) { $declaringClass = $param->__toString(); - $pattern = '/Parameter #\d+ \[ ([^\s]+) \$\w+ \]/'; + $pattern = '/<[^>]+>\s*([^$\s]+)/'; if (preg_match($pattern, $declaringClass, $matches)) { $classFactoryName = $matches[1];