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
2 changes: 1 addition & 1 deletion UPGRADE-8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ DoctrineBridge
```php
$type = $extractor->getType(Foo::class, 'property');
```

* Remove support for auto-mapping Doctrine entities to controller arguments; use explicit mapping instead
* Make `ProxyCacheWarmer` class `final`

ExpressionLanguage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,10 @@
}

return $criteria;
} elseif (null === $mapping) {
trigger_deprecation('symfony/doctrine-bridge', '7.1', 'Relying on auto-mapping for Doctrine entities is deprecated for argument $%s of "%s": declare the mapping using either the #[MapEntity] attribute or mapped route parameters.', $argument->getName(), method_exists($argument, 'getControllerName') ? $argument->getControllerName() : 'n/a');
$mapping = $request->attributes->keys();
}

if ($mapping && array_is_list($mapping)) {
$mapping = array_combine($mapping, $mapping);

Check failure on line 195 in src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

NoValue

src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php:195:48: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)

Check failure on line 195 in src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

NoValue

src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php:195:38: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)

Check failure on line 195 in src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

NoValue

src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php:195:48: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)

Check failure on line 195 in src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php

View workflow job for this annotation

GitHub Actions / Psalm

NoValue

src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php:195:38: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
}

foreach ($options->exclude as $exclude) {
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bridge/Doctrine/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
8.0
---

* Remove support for auto-mapping Doctrine entities to controller arguments; use explicit mapping instead
* Make `ProxyCacheWarmer` class `final`

7.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ public function testResolveWithoutManager()
$this->assertSame([], $resolver->resolve($request, $argument));
}

/**
* @group legacy
*/
public function testResolveWithNoIdAndDataOptional()
{
$manager = $this->createMock(ObjectManager::class);
Expand Down Expand Up @@ -247,9 +244,6 @@ public static function idsProvider(): iterable
yield ['foo'];
}

/**
* @group legacy
*/
public function testResolveGuessOptional()
{
$manager = $this->createMock(ObjectManager::class);
Expand All @@ -262,11 +256,7 @@ public function testResolveGuessOptional()
$argument = $this->createArgument('stdClass', new MapEntity(), 'arg', true);

$metadata = $this->createMock(ClassMetadata::class);
$manager->expects($this->once())
->method('getClassMetadata')
->with('stdClass')
->willReturn($metadata);

$manager->expects($this->never())->method('getClassMetadata');
$manager->expects($this->never())->method('getRepository');

$this->expectException(NearMissValueResolverException::class);
Expand Down
Loading