Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions UPGRADE-8.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ DependencyInjection

* Deprecate configuring options `alias`, `parent`, `synthetic`, `file`, `arguments`, `properties`, `configurator` or `calls` when using `from_callable`

DoctrineBridge
--------------

* Deprecate setting an `$aliasMap` in `RegisterMappingsPass`. Namespace aliases are no longer supported in Doctrine.

FrameworkBundle
---------------

Expand Down
5 changes: 5 additions & 0 deletions src/Symfony/Bridge/Doctrine/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

8.1
---

* Deprecate setting an `$aliasMap` in `RegisterMappingsPass`. Namespace aliases are no longer supported in Doctrine.

8.0
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ public function __construct(
private readonly string $registerAliasMethodName = '',
private readonly array $aliasMap = [],
) {
if ($aliasMap && (!$configurationPattern || !$registerAliasMethodName)) {
throw new \InvalidArgumentException('configurationPattern and registerAliasMethodName are required to register namespace alias.');
if ($aliasMap) {
trigger_deprecation('symfony/doctrine-bridge', '8.1', 'The property RegisterMappingsPass::$aliasMap is deprecated and will be removed in 9.0. Namespace alias are no longer supported.');

if (!$configurationPattern || !$registerAliasMethodName) {
throw new \InvalidArgumentException('configurationPattern and registerAliasMethodName are required to register namespace alias.');
}
}
}

Expand Down Expand Up @@ -103,7 +107,7 @@ public function process(ContainerBuilder $container): void
* Get the service name of the metadata chain driver that the mappings
* should be registered with.
*
* @throws InvalidArgumentException if non of the managerParameters has a
* @throws InvalidArgumentException if none of the managerParameters has a
* non-empty value
*/
protected function getChainDriverServiceName(ContainerBuilder $container): string
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bridge/Doctrine/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"php": ">=8.4",
"doctrine/event-manager": "^2",
"doctrine/persistence": "^3.1|^4",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.0",
"symfony/service-contracts": "^2.5|^3"
Expand Down
Loading