Skip to content

test: drop the symfony/property-info 6.4 compatibility guards - #8524

Open
Maxcastel wants to merge 1 commit into
api-platform:mainfrom
Maxcastel:test/drop-property-info-6.4-guards
Open

test: drop the symfony/property-info 6.4 compatibility guards#8524
Maxcastel wants to merge 1 commit into
api-platform:mainfrom
Maxcastel:test/drop-property-info-6.4-guards

Conversation

@Maxcastel

Copy link
Copy Markdown
Contributor
Q A
Branch? main
Tickets n/a
License MIT
Doc PR n/a

Thirteen tests guarded their body behind a method_exists() check on PropertyInfoExtractor::getType(), with a comment claiming property-info 6.4 was still supported:

if (!method_exists(PropertyInfoExtractor::class, 'getType')) { // @phpstan-ignore-line symfony/property-info 6.4 is still allowed and this may be true
    $this->markTestSkipped('This test only supports type-info component');
}

symfony/property-info is constrained to ^7.4 || ^8.0 in the root and in the components that require it, and getType() is present and undeprecated on both bounds:

public function getType(string $class, string $property, array $context = []): ?Type  // 7.4 line 57, 8.1 line 56

https://github.com/symfony/property-info/blob/7.4/PropertyInfoExtractor.php
https://github.com/symfony/property-info/blob/8.1/PropertyInfoExtractor.php

So the guard always evaluates to true and none of those could run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant