Skip to content

Commit ef1d6b0

Browse files
committed
Bump PHPStan version
and fix a mistake in a readme
1 parent a18f7cf commit ef1d6b0

File tree

8 files changed

+9
-10
lines changed

8 files changed

+9
-10
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
- *update-project-dependencies
111111
- run:
112112
name: Install PHPStan
113-
command: composer global require phpstan/phpstan:0.10.1
113+
command: composer global require phpstan/phpstan:0.10.5
114114
- *save-composer-cache-by-revision
115115
- *save-composer-cache-by-branch
116116
- run:

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ install:
1919
- echo extension=php_pdo_sqlite.dll >> php.ini
2020
- echo memory_limit=3G >> php.ini
2121
- cd %APPVEYOR_BUILD_FOLDER%
22-
- composer install --no-interaction --no-progress
22+
- composer install --no-interaction --no-progress --no-suggest
2323

2424
test_script:
2525
- cd %APPVEYOR_BUILD_FOLDER%

features/security/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ one of the most popular framework validation in the world.
6060

6161
The sending of security headers is ensured by [our "send security headers" functional test suite](send_security_headers.feature)
6262
and the unit tests of the [`RespondListener`](../../tests/EventListener/RespondListenerTest.php), [`ExceptionAction`](../../tests/Action/ExceptionActionTest.php)
63-
and [`ValidationExceptionListener`](../../tests/Bridge/Symfony/Validation/EventListener/ValidationExceptionListenerTest.php).
63+
and [`ValidationExceptionListener`](../../tests/Bridge/Symfony/Validator/EventListener/ValidationExceptionListenerTest.php).
6464

6565
### JSON encoding
6666

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ parameters:
88
ignoreErrors:
99
# Real problems, hard to fix
1010
- '#Parameter \#2 \$dqlPart of method Doctrine\\ORM\\QueryBuilder::add\(\) expects array\|object, string given\.#'
11+
- '#Call to function method_exists\(\) with .Doctrine.+ and .get(Join|Alias|Parts). will always evaluate to false\.#'
1112

1213
# False positives
1314
- '#Access to an undefined property Prophecy\\Prophecy\\ObjectProphecy::\$[a-zA-Z0-9_]+#'

src/DataProvider/SubresourceDataProviderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interface SubresourceDataProviderInterface
3232
*
3333
* @throws ResourceClassNotSupportedException
3434
*
35-
* @return object|null
35+
* @return array|object|null
3636
*/
3737
public function getSubresource(string $resourceClass, array $identifiers, array $context, string $operationName = null);
3838
}

src/GraphQl/Type/Definition/IterableType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use GraphQL\Language\AST\ListValueNode;
2121
use GraphQL\Language\AST\ObjectValueNode;
2222
use GraphQL\Language\AST\StringValueNode;
23+
use GraphQL\Language\AST\ValueNode;
2324
use GraphQL\Type\Definition\ScalarType;
2425
use GraphQL\Utils\Utils;
2526

@@ -80,7 +81,7 @@ public function parseLiteral($valueNode, array $variables = null)
8081
}
8182

8283
/**
83-
* @param StringValueNode|BooleanValueNode|IntValueNode|FloatValueNode|ObjectValueNode|ListValueNode $valueNode
84+
* @param StringValueNode|BooleanValueNode|IntValueNode|FloatValueNode|ObjectValueNode|ListValueNode|ValueNode $valueNode
8485
*/
8586
private function parseIterableLiteral($valueNode)
8687
{

src/Swagger/Serializer/DocumentationNormalizer.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,7 @@ private function updateGetOperation(\ArrayObject $pathOperation, array $mimeType
263263
],
264264
],
265265
];
266-
267-
if (!isset($pathOperation['parameters']) && $parameters = $this->getFiltersParameters($resourceClass, $operationName, $resourceMetadata, $definitions, $serializerContext)) {
268-
$pathOperation['parameters'] = $parameters;
269-
}
266+
$pathOperation['parameters'] ?? $pathOperation['parameters'] = $this->getFiltersParameters($resourceClass, $operationName, $resourceMetadata, $definitions, $serializerContext);
270267

271268
if ($this->paginationEnabled && $resourceMetadata->getCollectionOperationAttribute($operationName, 'pagination_enabled', true, true)) {
272269
$pathOperation['parameters'][] = $this->getPaginationParameters();

tests/Metadata/Property/Factory/InheritedPropertyNameCollectionFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testCreate()
3434

3535
$propertyNameCollectionFactory = $this->prophesize(PropertyNameCollectionFactoryInterface::class);
3636
$propertyNameCollectionFactory->create(DummyTableInheritance::class, [])->willReturn(new PropertyNameCollection(['name']))->shouldBeCalled();
37-
$propertyNameCollectionFactory->create(DummyTableInheritanceChild::class, [])->willReturn(new PropertyNameCollection(['nickname', 169]))->shouldBeCalled();
37+
$propertyNameCollectionFactory->create(DummyTableInheritanceChild::class, [])->willReturn(new PropertyNameCollection(['nickname', '169']))->shouldBeCalled();
3838

3939
$factory = new InheritedPropertyNameCollectionFactory($resourceNameCollectionFactory->reveal(), $propertyNameCollectionFactory->reveal());
4040
$metadata = $factory->create(DummyTableInheritance::class);

0 commit comments

Comments
 (0)