diff --git a/packages/database/src/Driver/Pdo/DsnHelper.php b/packages/database/src/Driver/Pdo/DsnHelper.php index ce080b223..5b3086f96 100644 --- a/packages/database/src/Driver/Pdo/DsnHelper.php +++ b/packages/database/src/Driver/Pdo/DsnHelper.php @@ -10,14 +10,17 @@ class DsnHelper { /** - * extractDsn - * - * @param string $dsn + * @param string $dsn + * @param string|null $type * * @return array */ - public static function extract(string $dsn): array + public static function extract(string $dsn, ?string &$type = null): array { + if (str_contains($dsn, ':')) { + [$type, $dsn] = explode(':', $dsn); + } + // Parse DSN to array $dsn = str_replace(';', "\n", $dsn); diff --git a/packages/database/src/Manager/AbstractMetaManager.php b/packages/database/src/Manager/AbstractMetaManager.php index e32774a22..82b160243 100644 --- a/packages/database/src/Manager/AbstractMetaManager.php +++ b/packages/database/src/Manager/AbstractMetaManager.php @@ -13,7 +13,7 @@ abstract class AbstractMetaManager { /** - * @var string + * @var ?string */ protected ?string $name = null; @@ -43,7 +43,7 @@ public function getDb(): DatabaseAdapter } /** - * @return string + * @return ?string */ public function getName(): ?string { diff --git a/packages/dom/src/HTMLFactory.php b/packages/dom/src/HTMLFactory.php index cfc75c2be..f66a860f7 100644 --- a/packages/dom/src/HTMLFactory.php +++ b/packages/dom/src/HTMLFactory.php @@ -15,8 +15,9 @@ * @method static DOMElement form(array $attrs = [], $content = null) * @method static DOMElement input(array $attrs = [], $content = null) * @method static DOMElement button(array $attrs = [], $content = null) + * + * @deprecated Use HTML5Factory instead. */ -#[\Deprecated(message: 'Use HTML5Factory instead.', since: '4.2')] class HTMLFactory extends DOMFactory { public const TEXT_SPAN = 1 << 0;