Skip to content

Commit f306974

Browse files
committed
Merge branch '4.1' into main
Resolve merge conflict in tests/Functional/ValidationTest.php by combining test cases.
2 parents c7bc151 + 4237b33 commit f306974

File tree

7 files changed

+15
-670
lines changed

7 files changed

+15
-670
lines changed

ApiPlatformProvider.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@
158158
use Illuminate\Routing\Router;
159159
use Illuminate\Support\ServiceProvider;
160160
use Negotiation\Negotiator;
161-
use phpDocumentor\Reflection\DocBlockFactory;
161+
use PHPStan\PhpDocParser\Parser\PhpDocParser;
162162
use Psr\Log\LoggerInterface;
163163
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
164-
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
164+
use Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor;
165165
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
166166
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
167167
use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
@@ -196,13 +196,13 @@ public function register(): void
196196
$this->mergeConfigFrom(__DIR__.'/config/api-platform.php', 'api-platform');
197197

198198
$this->app->singleton(PropertyInfoExtractorInterface::class, function () {
199-
$phpDocExtractor = class_exists(DocBlockFactory::class) ? new PhpDocExtractor() : null;
199+
$phpstanExtractor = class_exists(PhpDocParser::class) ? new PhpStanExtractor() : null;
200200
$reflectionExtractor = new ReflectionExtractor();
201201

202202
return new PropertyInfoExtractor(
203203
[$reflectionExtractor],
204-
$phpDocExtractor ? [$phpDocExtractor, $reflectionExtractor] : [$reflectionExtractor],
205-
$phpDocExtractor ? [$phpDocExtractor] : [],
204+
$phpstanExtractor ? [$phpstanExtractor, $reflectionExtractor] : [$reflectionExtractor],
205+
[],
206206
[$reflectionExtractor],
207207
[$reflectionExtractor]
208208
);

Eloquent/PropertyAccess/PropertyAccessor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ public function __construct(
3232
}
3333

3434
/**
35-
* @param array<mixed, mixed>|object $objectOrArray
35+
* @param object|array<mixed, mixed> $objectOrArray
36+
*
37+
* @param-out object|array<mixed, mixed> $objectOrArray
3638
*/
3739
public function setValue(object|array &$objectOrArray, string|PropertyPathInterface $propertyPath, mixed $value): void
3840
{

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@
4949
"illuminate/container": "^11.0 || ^12.0",
5050
"symfony/type-info": "^7.2",
5151
"symfony/web-link": "^6.4 || ^7.1",
52-
"willdurand/negotiation": "^3.1",
53-
"phpstan/phpdoc-parser": "^1.29 || ^2.0",
54-
"phpdocumentor/reflection-docblock": "^5.1"
52+
"willdurand/negotiation": "^3.1"
5553
},
5654
"require-dev": {
55+
"api-platform/graphql": "^4.1",
5756
"doctrine/dbal": "^4.0",
5857
"larastan/larastan": "^2.0 || ^3.0",
58+
"laravel/sanctum": "^4.0",
5959
"orchestra/testbench": "^9.1",
60-
"phpunit/phpunit": "11.5.x-dev",
61-
"api-platform/graphql": "^4.1",
62-
"laravel/sanctum": "^4.0"
60+
"phpdocumentor/type-resolver": "^1.7",
61+
"phpstan/phpdoc-parser": "^1.29 || ^2.0",
62+
"phpunit/phpunit": "11.5.x-dev"
6363
},
6464
"autoload": {
6565
"psr-4": {
@@ -75,7 +75,7 @@
7575
},
7676
"suggest": {
7777
"api-platform/graphql": "Enable GraphQl support.",
78-
"phpdocumentor/reflection-docblock": ""
78+
"phpstan/phpdoc-parser": "To support extracting metadata from PHPDoc."
7979
},
8080
"extra": {
8181
"laravel": {

0 commit comments

Comments
 (0)