Skip to content

Commit

Permalink
Upgrade PHPStan to ^1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
starred-gijs committed Mar 13, 2024
1 parent 898c84e commit db387a6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ lock-symfony-%:
docker-compose run --no-deps --rm php composer install --prefer-dist --no-interaction ${COMPOSER_FLAGS}

test-composer-install: lock-symfony-3.4 lock-symfony-4.4 lock-symfony-5.0 lock-symfony-6.0
test-composer-install: lock-symfony-5.4 lock-symfony-6.0 lock-symfony-7.0

pre-commit-checks: cs-fix phpstan test infection
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
"facile-it/facile-coding-standard": "^1.2.0",
"facile-it/symfony-functional-testcase": "^1.0",
"infection/infection": "^0.23",
"jangregor/phpstan-prophecy": "^0.8.0",
"jangregor/phpstan-prophecy": "^1.0",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.25",
"phpstan/phpstan-phpunit": "^0.12.8",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^9.6.13",
"symfony/browser-kit": "^5.0 || ^6.0 || ^7.0",
"symfony/flex": "^1.12",
Expand Down
22 changes: 21 additions & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,35 @@ parameters:
path: src/Transport/Connection.php

-
message: "#^Method Facile\\\\MongoDbMessenger\\\\Transport\\\\Connection\\:\\:findBy\\(\\) should return iterable\\<MongoDB\\\\Model\\\\BSONDocument\\>&MongoDB\\\\Driver\\\\Cursor but returns MongoDB\\\\Driver\\\\Cursor\\.$#"
message: "#^Method Facile\\\\MongoDbMessenger\\\\Transport\\\\Connection\\:\\:findBy\\(\\) should return iterable\\<MongoDB\\\\Model\\\\BSONDocument\\>&MongoDB\\\\Driver\\\\Cursor but returns Iterator&MongoDB\\\\Driver\\\\CursorInterface\\.$#"
count: 1
path: src/Transport/Connection.php

-
message: "#^Method Facile\\\\MongoDbMessenger\\\\Transport\\\\Connection\\:\\:send\\(\\) should return MongoDB\\\\BSON\\\\ObjectId but returns mixed\\.$#"
count: 1
path: src/Transport/Connection.php

-
message: "#^Method Facile\\\\MongoDbMessenger\\\\Transport\\\\TransportFactory\\:\\:buildConfiguration\\(\\) should return array\\{connection_name\\: string, collection_name\\: string, queue_name\\: string, redeliver_timeout\\: int, document_enhancers\\: array\\<string\\>, resettable\\: 0\\|1\\|bool\\} but returns non\\-empty\\-array\\<int\\|string, mixed\\>\\.$#"
count: 1
path: src/Transport/TransportFactory.php

-
message: "#^Parameter \\#1 \\$enhancer of method Facile\\\\MongoDbMessenger\\\\Transport\\\\Connection\\:\\:addDocumentEnhancer\\(\\) expects Facile\\\\MongoDbMessenger\\\\Extension\\\\DocumentEnhancer, object\\|null given\\.$#"
count: 1
path: src/Transport/TransportFactory.php

-
message: "#^Parameter \\#1 \\$enhancers of method Facile\\\\MongoDbMessenger\\\\Transport\\\\TransportFactory\\:\\:validateDocumentEnhancers\\(\\) expects array\\<string\\>, mixed given\\.$#"
count: 1
path: src/Transport/TransportFactory.php

-
message: "#^Property Facile\\\\MongoDbMessenger\\\\Tests\\\\Stubs\\\\InstantiableDocumentEnhancer\\:\\:\\$foo is never read, only written\\.$#"
count: 1
path: tests/Stubs/InstantiableDocumentEnhancer.php

-
message: "#^Constructor of class Facile\\\\MongoDbMessenger\\\\Tests\\\\Stubs\\\\NotInstantiableDocumentEnhancer has an unused parameter \\$bar\\.$#"
count: 1
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ parameters:
dynamicConstantNames:
- Symfony\Component\HttpKernel\Kernel::VERSION_ID
ignoreErrors:
- /no value type specified in iterable type MongoDB\\Model\\BSONDocument\./
- /^Access to an undefined property MongoDB\\Model\\BSONDocument::\$\w+\.$/
includes:
- phpstan-baseline.neon

0 comments on commit db387a6

Please sign in to comment.