Skip to content

Commit f9a0e00

Browse files
Bart Wachnicolas-grekas
authored andcommitted
failing test for issue 38861
1 parent 4c36145 commit f9a0e00

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public function testGetProperties()
7878
'indexedBaz',
7979
'indexedByDt',
8080
'indexedByCustomType',
81+
'indexedBuz',
8182
]);
8283

8384
$this->assertEquals(
@@ -197,6 +198,14 @@ public function typesProvider()
197198
new Type(Type::BUILTIN_TYPE_OBJECT, false, DoctrineRelation::class)
198199
)]],
199200
['indexedByCustomType', null],
201+
['indexedBuz', [new Type(
202+
Type::BUILTIN_TYPE_OBJECT,
203+
false,
204+
Collection::class,
205+
true,
206+
new Type(Type::BUILTIN_TYPE_STRING),
207+
new Type(Type::BUILTIN_TYPE_OBJECT, false, DoctrineRelation::class)
208+
)]],
200209
];
201210

202211
if (class_exists(Types::class)) {

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,9 @@ class DoctrineDummy
132132
* @OneToMany(targetEntity="DoctrineRelation", mappedBy="customType", indexBy="customType")
133133
*/
134134
private $indexedByCustomType;
135+
136+
/**
137+
* @OneToMany(targetEntity="DoctrineRelation", mappedBy="buzField", indexBy="buzField")
138+
*/
139+
protected $indexedBuz;
135140
}

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,10 @@ class DoctrineRelation
5454
* @Column(type="foo")
5555
*/
5656
private $customType;
57+
58+
/**
59+
* @Column(type="guid", name="different_than_field")
60+
* @ManyToOne(targetEntity="DoctrineDummy", inversedBy="indexedBuz")
61+
*/
62+
protected $buzField;
5763
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy