From 01fe5ebd0360f9dff94ac0efeca4a91f1c0b515b Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Wed, 3 Apr 2024 10:40:51 +0200 Subject: [PATCH] drop obsolete namespace alias method --- CHANGELOG.md | 8 ++++---- src/ManagerRegistry.php | 19 ------------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b784493..a63f85e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,14 @@ Changelog 3.0.0 (unreleased) ------------------ -* Upgrade to phpcr-odm 2.0 -* Support jackalope 2.0 +* Upgrade to PHPCR-ODM 2.0 +* Support Jackalope 2.0 * Drop support for PHP 7 -* Replace doctrine cache with PSR-6 cache with the symfony/cache implementation. +* Replace doctrine cache with PSR-6 cache with the `symfony/cache` implementation. The configuration of metadata_cache_driver changed. By default, it creates an `array` cache. To configure a service, specify `type: service` and specify your service in the `id` property. To use a cache pool, specify the service id of that pool. -* Removed support for namespace alias, use the FQN names. +* Removed support for namespace alias, use the FQN names. The method `ManagerRegistry::getAliasNamespace` has been deleted. * Introduced the ManagerRegistryInterface for the ManagerRegistry and adjusted the service alias for autowiring to the interface. * The following container parameters are no longer taken into account (memcache and apc seem to have never been used anyways). If you have customised the array cache class, please check if this is still needed - and note that starting from this version, diff --git a/src/ManagerRegistry.php b/src/ManagerRegistry.php index 77ded2a4..17d51607 100644 --- a/src/ManagerRegistry.php +++ b/src/ManagerRegistry.php @@ -37,25 +37,6 @@ public function __construct( ); } - /** - * Resolves a registered namespace alias to the full namespace. - * - * @param string $alias - * - * @throws PHPCRException - */ - public function getAliasNamespace($alias): string - { - foreach (array_keys($this->getManagers()) as $name) { - try { - return $this->getManager($name)->getConfiguration()->getDocumentNamespace($alias); - } catch (PHPCRException $e) { - } - } - - throw PHPCRException::unknownDocumentNamespace($alias); - } - public function getManager($name = null): DocumentManagerInterface { $dm = parent::getManager($name);