Skip to content

Commit 3096906

Browse files
authored
test(functional): skip union-collection IRI test on legacy property-info (#8356)
1 parent ee81a5d commit 3096906

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/Functional/UnionIriCollectionTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\UnionIriCollection\Container;
1919
use ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\UnionIriCollection\Foo;
2020
use ApiPlatform\Tests\SetupClassResourcesTrait;
21+
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
2122

2223
final class UnionIriCollectionTest extends ApiTestCase
2324
{
@@ -35,6 +36,12 @@ public static function getResources(): array
3536

3637
public function testDenormalizeCollectionAcceptsIriOfEachUnionMember(): void
3738
{
39+
// The union-collection IRI guard relies on the native type; the legacy
40+
// property-info path (< 7.1) only keeps the first collection value type.
41+
if (!method_exists(PropertyInfoExtractor::class, 'getType')) {
42+
$this->markTestSkipped('Requires symfony/property-info >= 7.1 (native types).');
43+
}
44+
3845
$response = self::createClient()->request('POST', '/union_iri_collection_containers', [
3946
'headers' => ['Content-Type' => 'application/ld+json', 'Accept' => 'application/ld+json'],
4047
'json' => ['attachments' => ['/union_iri_collection_foos/1', '/union_iri_collection_bars/2']],

0 commit comments

Comments
 (0)