Skip to content

Commit 6bc88e0

Browse files
Merge branch '3.4' into 4.4
* 3.4: [Form] Sync translations Added dutch translations for new invalid messages Don't skip Doctrine tests on php 8. Bump APCu to 5.1.19 on Travis. [WebProfilerBundle] Hide debug toolbar in print view indexBy does not refer to attributes, but to column names Fix Reflection file name with eval()\'d code [HttpFoundation] Fix Range Requests
2 parents 5e9a55b + 857afb8 commit 6bc88e0

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
@@ -107,19 +107,10 @@ public function getTypes($class, $property, array $context = [])
107107
$associationMapping = $metadata->getAssociationMapping($property);
108108

109109
if (isset($associationMapping['indexBy'])) {
110-
$indexProperty = $associationMapping['indexBy'];
110+
$indexColumn = $associationMapping['indexBy'];
111111
/** @var ClassMetadataInfo $subMetadata */
112112
$subMetadata = $this->entityManager ? $this->entityManager->getClassMetadata($associationMapping['targetEntity']) : $this->classMetadataFactory->getMetadataFor($associationMapping['targetEntity']);
113-
$typeOfField = $subMetadata->getTypeOfField($indexProperty);
114-
115-
if (null === $typeOfField) {
116-
$associationMapping = $subMetadata->getAssociationMapping($indexProperty);
117-
118-
/** @var ClassMetadataInfo $subMetadata */
119-
$indexProperty = $subMetadata->getSingleAssociationReferencedJoinColumnName($indexProperty);
120-
$subMetadata = $this->entityManager ? $this->entityManager->getClassMetadata($associationMapping['targetEntity']) : $this->classMetadataFactory->getMetadataFor($associationMapping['targetEntity']);
121-
$typeOfField = $subMetadata->getTypeOfField($indexProperty);
122-
}
113+
$typeOfField = $subMetadata->getTypeOfField($subMetadata->getFieldForColumn($indexColumn));
123114

124115
if (!$collectionKeyType = $this->getPhpType($typeOfField)) {
125116
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)