Skip to content

Commit 6452dc6

Browse files
committed
Merge branch '4.4' into 5.1
2 parents 71efee2 + 6bc88e0 commit 6452dc6

File tree

7 files changed

+4
-41
lines changed

7 files changed

+4
-41
lines changed

PropertyInfo/DoctrineExtractor.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,10 @@ public function getTypes(string $class, string $property, array $context = [])
9595
$associationMapping = $metadata->getAssociationMapping($property);
9696

9797
if (isset($associationMapping['indexBy'])) {
98-
$indexProperty = $associationMapping['indexBy'];
98+
$indexColumn = $associationMapping['indexBy'];
9999
/** @var ClassMetadataInfo $subMetadata */
100100
$subMetadata = $this->entityManager ? $this->entityManager->getClassMetadata($associationMapping['targetEntity']) : $this->classMetadataFactory->getMetadataFor($associationMapping['targetEntity']);
101-
$typeOfField = $subMetadata->getTypeOfField($indexProperty);
102-
103-
if (null === $typeOfField) {
104-
$associationMapping = $subMetadata->getAssociationMapping($indexProperty);
105-
106-
/** @var ClassMetadataInfo $subMetadata */
107-
$indexProperty = $subMetadata->getSingleAssociationReferencedJoinColumnName($indexProperty);
108-
$subMetadata = $this->entityManager ? $this->entityManager->getClassMetadata($associationMapping['targetEntity']) : $this->classMetadataFactory->getMetadataFor($associationMapping['targetEntity']);
109-
$typeOfField = $subMetadata->getTypeOfField($indexProperty);
110-
}
101+
$typeOfField = $subMetadata->getTypeOfField($subMetadata->getFieldForColumn($indexColumn));
111102

112103
if (!$collectionKeyType = $this->getPhpType($typeOfField)) {
113104
return null;

Tests/Form/Type/EntityTypeTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ class EntityTypeTest extends BaseTypeTest
6060

6161
protected static $supportedFeatureSetVersion = 404;
6262

63-
public static function setUpBeforeClass(): void
64-
{
65-
if (\PHP_VERSION_ID >= 80000) {
66-
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
67-
}
68-
}
69-
7063
protected function setUp(): void
7164
{
7265
$this->em = DoctrineTestHelper::createTestEntityManager();

Tests/PropertyInfo/Fixtures/DoctrineDummy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class DoctrineDummy
4242
public $bar;
4343

4444
/**
45-
* @ManyToMany(targetEntity="DoctrineRelation", indexBy="rguid")
45+
* @ManyToMany(targetEntity="DoctrineRelation", indexBy="rguid_column")
4646
*/
4747
protected $indexedBar;
4848

Tests/PropertyInfo/Fixtures/DoctrineRelation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DoctrineRelation
3030
public $id;
3131

3232
/**
33-
* @Column(type="guid")
33+
* @Column(type="guid", name="rguid_column")
3434
*/
3535
protected $rguid;
3636

Tests/Security/RememberMe/DoctrineTokenProviderTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313
*/
1414
class DoctrineTokenProviderTest extends TestCase
1515
{
16-
public static function setUpBeforeClass(): void
17-
{
18-
if (\PHP_VERSION_ID >= 80000) {
19-
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
20-
}
21-
}
22-
2316
public function testCreateNewToken()
2417
{
2518
$provider = $this->bootstrapProvider();

Tests/Security/User/EntityUserProviderTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@
2424

2525
class EntityUserProviderTest extends TestCase
2626
{
27-
public static function setUpBeforeClass(): void
28-
{
29-
if (\PHP_VERSION_ID >= 80000) {
30-
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
31-
}
32-
}
33-
3427
public function testRefreshUserGetsUserByPrimaryKey()
3528
{
3629
$em = DoctrineTestHelper::createTestEntityManager();

Tests/Validator/Constraints/UniqueEntityValidatorTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
5959

6060
protected $repositoryFactory;
6161

62-
public static function setUpBeforeClass(): void
63-
{
64-
if (\PHP_VERSION_ID >= 80000) {
65-
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
66-
}
67-
}
68-
6962
protected function setUp(): void
7063
{
7164
$this->repositoryFactory = new TestRepositoryFactory();

0 commit comments

Comments
 (0)