Skip to content

Commit 4032aa3

Browse files
committed
Merge branch '2.3'
2 parents f874605 + b4e5c21 commit 4032aa3

File tree

117 files changed

+50
-1078
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+50
-1078
lines changed

.php_cs.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ return PhpCsFixer\Config::create()
6363
'use',
6464
],
6565
],
66+
'no_superfluous_phpdoc_tags' => true,
6667
'no_useless_else' => true,
6768
'no_useless_return' => true,
6869
'ordered_imports' => [

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"psr/log": "^1.0",
4949
"ramsey/uuid": "^3.7",
5050
"ramsey/uuid-doctrine": "^1.4",
51-
"sensio/framework-extra-bundle": "^3.0.11 || ^4.0",
51+
"sensio/framework-extra-bundle": "^3.0.11 || ^4.0 || ^5.0",
5252
"symfony/asset": "^3.3 || ^4.0",
5353
"symfony/cache": "^3.3 || ^4.0",
5454
"symfony/config": "^3.4 || ^4.0",

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@ parameters:
3434
- '#Method ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Filter\\FilterInterface::apply\(\) invoked with 5 parameters, 3-4 required\.#'
3535
- '#Method ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Filter\\OrderFilter::filterProperty\(\) invoked with 7 parameters, 5-6 required\.#'
3636
- '#Method ApiPlatform\\Core\\DataProvider\\CollectionDataProviderInterface::getCollection\(\) invoked with 3 parameters, 1-2 required.#'
37-
- '#PHPDoc tag @param references unknown parameter \$operationName#'

src/Action/ExceptionAction.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ final class ExceptionAction
4646
private $exceptionToStatus;
4747

4848
/**
49-
* @param SerializerInterface $serializer
50-
* @param array $errorFormats A list of enabled formats, the first one will be the default
51-
* @param array $exceptionToStatus A list of exceptions mapped to their HTTP status code
49+
* @param array $errorFormats A list of enabled formats, the first one will be the default
50+
* @param array $exceptionToStatus A list of exceptions mapped to their HTTP status code
5251
*/
5352
public function __construct(SerializerInterface $serializer, array $errorFormats, array $exceptionToStatus = [])
5453
{
@@ -59,11 +58,6 @@ public function __construct(SerializerInterface $serializer, array $errorFormats
5958

6059
/**
6160
* Converts a an exception to a JSON response.
62-
*
63-
* @param FlattenException $exception
64-
* @param Request $request
65-
*
66-
* @return Response
6761
*/
6862
public function __invoke(FlattenException $exception, Request $request): Response
6963
{

src/Api/FilterCollectionFactory.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ public function __construct(array $filtersIds)
3636

3737
/**
3838
* Creates a filter collection from a filter locator.
39-
*
40-
* @param ContainerInterface $filterLocator
41-
*
42-
* @return FilterCollection
4339
*/
4440
public function createFilterCollectionFromLocator(ContainerInterface $filterLocator): FilterCollection
4541
{

src/Api/FilterInterface.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ interface FilterInterface
3737
* The description can contain additional data specific to a filter.
3838
*
3939
* @see \ApiPlatform\Core\Swagger\Serializer\DocumentationNormalizer::getFiltersParameters
40-
*
41-
* @param string $resourceClass
42-
*
43-
* @return array
4440
*/
4541
public function getDescription(string $resourceClass): array;
4642
}

src/Api/FilterLocatorTrait.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ trait FilterLocatorTrait
3131
* Sets a filter locator with a backward compatibility.
3232
*
3333
* @param ContainerInterface|FilterCollection|null $filterLocator
34-
* @param bool $allowNull
3534
*/
3635
private function setFilterLocator($filterLocator = null, bool $allowNull = false)
3736
{
@@ -49,7 +48,6 @@ private function setFilterLocator($filterLocator = null, bool $allowNull = false
4948
/**
5049
* Gets a filter with a backward compatibility.
5150
*
52-
* @param string $filterId
5351
*
5452
* @return FilterInterface|null
5553
*/

src/Api/IdentifiersExtractorInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ public function getIdentifiersFromResourceClass(string $resourceClass): array;
3333
* @param object $item
3434
*
3535
* @throws RuntimeException
36-
*
37-
* @return array
3836
*/
3937
public function getIdentifiersFromItem($item): array;
4038
}

src/Api/IriConverterInterface.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ interface IriConverterInterface
2727
/**
2828
* Retrieves an item from its IRI.
2929
*
30-
* @param string $iri
31-
* @param array $context
3230
*
3331
* @throws InvalidArgumentException
3432
* @throws ItemNotFoundException
@@ -41,50 +39,33 @@ public function getItemFromIri(string $iri, array $context = []);
4139
* Gets the IRI associated with the given item.
4240
*
4341
* @param object $item
44-
* @param int $referenceType
4542
*
4643
* @throws InvalidArgumentException
4744
* @throws RuntimeException
48-
*
49-
* @return string
5045
*/
5146
public function getIriFromItem($item, int $referenceType = UrlGeneratorInterface::ABS_PATH): string;
5247

5348
/**
5449
* Gets the IRI associated with the given resource collection.
5550
*
56-
* @param string $resourceClass
57-
* @param int $referenceType
5851
*
5952
* @throws InvalidArgumentException
60-
*
61-
* @return string
6253
*/
6354
public function getIriFromResourceClass(string $resourceClass, int $referenceType = UrlGeneratorInterface::ABS_PATH): string;
6455

6556
/**
6657
* Gets the item IRI associated with the given resource.
6758
*
68-
* @param string $resourceClass
69-
* @param array $identifiers
70-
* @param int $referenceType
7159
*
7260
* @throws InvalidArgumentException
73-
*
74-
* @return string
7561
*/
7662
public function getItemIriFromResourceClass(string $resourceClass, array $identifiers, int $referenceType = UrlGeneratorInterface::ABS_PATH): string;
7763

7864
/**
7965
* Gets the IRI associated with the given resource subresource.
8066
*
81-
* @param string $resourceClass
82-
* @param array $identifiers
83-
* @param int $referenceType
8467
*
8568
* @throws InvalidArgumentException
86-
*
87-
* @return string
8869
*/
8970
public function getSubresourceIriFromResourceClass(string $resourceClass, array $identifiers, int $referenceType = UrlGeneratorInterface::ABS_PATH): string;
9071
}

src/Api/OperationMethodResolverInterface.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,16 @@ interface OperationMethodResolverInterface
2525
/**
2626
* Resolves the uppercased HTTP method associated with a collection operation.
2727
*
28-
* @param string $resourceClass
29-
* @param string $operationName
3028
*
3129
* @throws RuntimeException
32-
*
33-
* @return string
3430
*/
3531
public function getCollectionOperationMethod(string $resourceClass, string $operationName): string;
3632

3733
/**
3834
* Resolves the uppercased HTTP method associated with an item operation.
3935
*
40-
* @param string $resourceClass
41-
* @param string $operationName
4236
*
4337
* @throws RuntimeException
44-
*
45-
* @return string
4638
*/
4739
public function getItemOperationMethod(string $resourceClass, string $operationName): string;
4840
}

src/Api/OperationTypeDeprecationHelper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ final class OperationTypeDeprecationHelper
3030
{
3131
/**
3232
* @param string|bool $operationType
33-
*
34-
* @return string
3533
*/
3634
public static function getOperationType($operationType): string
3735
{

src/Api/ResourceClassResolverInterface.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,13 @@ interface ResourceClassResolverInterface
2525
/**
2626
* Guesses the associated resource.
2727
*
28-
* @param mixed $value
29-
* @param string|null $resourceClass
30-
* @param bool $strict
3128
*
3229
* @throws InvalidArgumentException
33-
*
34-
* @return string
3530
*/
3631
public function getResourceClass($value, string $resourceClass = null, bool $strict = false): string;
3732

3833
/**
3934
* Is the given class a resource class?
40-
*
41-
* @param string $type
42-
*
43-
* @return bool
4435
*/
4536
public function isResourceClass(string $type): bool;
4637
}

src/Bridge/Doctrine/Common/DataPersister.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ public function remove($data)
7777
/**
7878
* Gets the Doctrine object manager associated with given data.
7979
*
80-
* @param mixed $data
8180
*
8281
* @return DoctrineObjectManager|null
8382
*/

src/Bridge/Doctrine/EventListener/WriteListener.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ public function __construct(ManagerRegistry $managerRegistry)
3636

3737
/**
3838
* Persists, updates or delete data return by the controller if applicable.
39-
*
40-
* @param GetResponseForControllerResultEvent $event
4139
*/
4240
public function onKernelView(GetResponseForControllerResultEvent $event)
4341
{
@@ -72,8 +70,6 @@ public function onKernelView(GetResponseForControllerResultEvent $event)
7270
/**
7371
* Gets the manager if applicable.
7472
*
75-
* @param string $resourceClass
76-
* @param mixed $data
7773
*
7874
* @return ObjectManager|null
7975
*/

src/Bridge/Doctrine/Orm/Extension/ContextAwareQueryItemExtensionInterface.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,5 @@ interface ContextAwareQueryItemExtensionInterface extends QueryItemExtensionInte
2424
{
2525
public function supportsResult(string $resourceClass, string $operationName = null, array $context = []): bool;
2626

27-
/**
28-
* @return mixed
29-
*/
3027
public function getResult(QueryBuilder $queryBuilder, string $resourceClass = null, string $operationName = null, array $context = []);
3128
}

src/Bridge/Doctrine/Orm/Extension/ContextAwareQueryResultCollectionExtensionInterface.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,5 @@ interface ContextAwareQueryResultCollectionExtensionInterface extends QueryResul
2424
{
2525
public function supportsResult(string $resourceClass, string $operationName = null, array $context = []): bool;
2626

27-
/**
28-
* @return mixed
29-
*/
3027
public function getResult(QueryBuilder $queryBuilder, string $resourceClass = null, string $operationName = null, array $context = []);
3128
}

src/Bridge/Doctrine/Orm/Extension/ContextAwareQueryResultItemExtensionInterface.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,5 @@ interface ContextAwareQueryResultItemExtensionInterface extends QueryResultItemE
2424
{
2525
public function supportsResult(string $resourceClass, string $operationName = null, array $context = []): bool;
2626

27-
/**
28-
* @return mixed
29-
*/
3027
public function getResult(QueryBuilder $queryBuilder, string $resourceClass = null, string $operationName = null, array $context = []);
3128
}

src/Bridge/Doctrine/Orm/Extension/FilterEagerLoadingExtension.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@ public function applyToCollection(QueryBuilder $queryBuilder, QueryNameGenerator
101101
/**
102102
* Returns a clone of the given query builder where everything gets re-aliased.
103103
*
104-
* @param QueryBuilder $queryBuilder
105-
* @param QueryNameGeneratorInterface $queryNameGenerator
106-
* @param string $originAlias the base alias
107-
* @param string $replacement the replacement for the base alias, will change the from alias
104+
* @param string $originAlias the base alias
105+
* @param string $replacement the replacement for the base alias, will change the from alias
108106
*
109107
* @return QueryBuilder
110108
*/

src/Bridge/Doctrine/Orm/Extension/PaginationExtension.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,6 @@ private function useFetchJoinCollection(QueryBuilder $queryBuilder, string $reso
215215

216216
/**
217217
* Determines whether output walkers should be used.
218-
*
219-
* @param QueryBuilder $queryBuilder
220-
*
221-
* @return bool
222218
*/
223219
private function useOutputWalkers(QueryBuilder $queryBuilder): bool
224220
{

src/Bridge/Doctrine/Orm/Extension/QueryResultCollectionExtensionInterface.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,5 @@ interface QueryResultCollectionExtensionInterface extends QueryCollectionExtensi
2626
{
2727
public function supportsResult(string $resourceClass, string $operationName = null): bool;
2828

29-
/**
30-
* @return mixed
31-
*/
3229
public function getResult(QueryBuilder $queryBuilder);
3330
}

src/Bridge/Doctrine/Orm/Extension/QueryResultItemExtensionInterface.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,5 @@ interface QueryResultItemExtensionInterface extends QueryItemExtensionInterface
2525
{
2626
public function supportsResult(string $resourceClass, string $operationName = null): bool;
2727

28-
/**
29-
* @return mixed
30-
*/
3128
public function getResult(QueryBuilder $queryBuilder);
3229
}

src/Bridge/Doctrine/Orm/Filter/AbstractFilter.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ abstract protected function filterProperty(string $property, $value, QueryBuilde
7979

8080
/**
8181
* Gets class metadata for the given resource.
82-
*
83-
* @param string $resourceClass
84-
*
85-
* @return ClassMetadata
8682
*/
8783
protected function getClassMetadata(string $resourceClass): ClassMetadata
8884
{
@@ -94,10 +90,6 @@ protected function getClassMetadata(string $resourceClass): ClassMetadata
9490

9591
/**
9692
* Determines whether the given property is enabled.
97-
*
98-
* @param string $property
99-
*
100-
* @return bool
10193
*/
10294
protected function isPropertyEnabled(string $property/*, string $resourceClass*/): bool
10395
{
@@ -123,12 +115,6 @@ protected function isPropertyEnabled(string $property/*, string $resourceClass*/
123115

124116
/**
125117
* Determines whether the given property is mapped.
126-
*
127-
* @param string $property
128-
* @param string $resourceClass
129-
* @param bool $allowAssociation
130-
*
131-
* @return bool
132118
*/
133119
protected function isPropertyMapped(string $property, string $resourceClass, bool $allowAssociation = false): bool
134120
{
@@ -145,10 +131,6 @@ protected function isPropertyMapped(string $property, string $resourceClass, boo
145131

146132
/**
147133
* Determines whether the given property is nested.
148-
*
149-
* @param string $property
150-
*
151-
* @return bool
152134
*/
153135
protected function isPropertyNested(string $property/*, string $resourceClass*/): bool
154136
{
@@ -174,11 +156,6 @@ protected function isPropertyNested(string $property/*, string $resourceClass*/)
174156

175157
/**
176158
* Determines whether the given property is embedded.
177-
*
178-
* @param string $property
179-
* @param string $resourceClass
180-
*
181-
* @return bool
182159
*/
183160
protected function isPropertyEmbedded(string $property, string $resourceClass): bool
184161
{
@@ -188,10 +165,7 @@ protected function isPropertyEmbedded(string $property, string $resourceClass):
188165
/**
189166
* Gets nested class metadata for the given resource.
190167
*
191-
* @param string $resourceClass
192168
* @param string[] $associations
193-
*
194-
* @return ClassMetadata
195169
*/
196170
protected function getNestedMetadata(string $resourceClass, array $associations): ClassMetadata
197171
{
@@ -217,10 +191,6 @@ protected function getNestedMetadata(string $resourceClass, array $associations)
217191
* Returns an array with the following keys:
218192
* - associations: array of associations according to nesting order
219193
* - field: string holding the actual field (leaf node)
220-
*
221-
* @param string $property
222-
*
223-
* @return array
224194
*/
225195
protected function splitPropertyParts(string $property/*, string $resourceClass*/): array
226196
{
@@ -292,10 +262,6 @@ protected function extractProperties(Request $request/*, string $resourceClass*/
292262
/**
293263
* Adds the necessary joins for a nested property.
294264
*
295-
* @param string $property
296-
* @param string $rootAlias
297-
* @param QueryBuilder $queryBuilder
298-
* @param QueryNameGeneratorInterface $queryNameGenerator
299265
*
300266
* @throws InvalidArgumentException If property is not nested
301267
*

0 commit comments

Comments
 (0)