Skip to content

Commit e3422bd

Browse files
committed
updated PhpStan to 1.0 and fixed newly occurring issues
1 parent 06a1daf commit e3422bd

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@
6666
"require-dev": {
6767
"doctrine/coding-standard": "^9.0.0",
6868
"doctrine/orm": "^2.10.2",
69-
"jangregor/phpstan-prophecy": "^0.8.1",
69+
"jangregor/phpstan-prophecy": "^1.0.0",
7070
"laminas/laminas-i18n": "^2.11.3",
7171
"laminas/laminas-log": "^2.13.1",
7272
"laminas/laminas-mvc-console": "^1.3.0",
7373
"laminas/laminas-serializer": "^2.11.0",
7474
"laminas/laminas-session": "^2.12.0",
7575
"laminas/laminas-test": "^3.5.1",
7676
"phpspec/prophecy-phpunit": "^2.0.1",
77-
"phpstan/phpstan": "^0.12.99",
78-
"phpstan/phpstan-phpunit": "^0.12.22",
77+
"phpstan/phpstan": "^1.1.2",
78+
"phpstan/phpstan-phpunit": "^1.0.0",
7979
"phpunit/phpunit": "^9.5.10",
8080
"predis/predis": "^1.1.9",
8181
"vimeo/psalm": "^4.11.2"

phpstan.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ parameters:
77
- src/Form/Element/ObjectMultiCheckboxV2Polyfill.php
88
- src/Form/Element/ObjectRadioV2Polyfill.php
99
- src/Form/Element/ObjectSelectV2Polyfill.php
10+
ignoreErrors:
11+
-
12+
message: '#Property DoctrineModule\\Module::\$serviceManager is never read, only written.#'
13+
path: src/Module.php
1014
includes:
1115
- vendor/phpstan/phpstan-phpunit/rules.neon
1216
- vendor/jangregor/phpstan-prophecy/extension.neon

src/Form/Element/Proxy.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Laminas\Stdlib\Guard\ArrayOrTraversableGuardTrait;
1313
use ReflectionMethod;
1414
use RuntimeException;
15-
use Traversable;
1615

1716
use function array_change_key_case;
1817
use function array_key_exists;
@@ -35,7 +34,7 @@ class Proxy implements ObjectManagerAwareInterface
3534
{
3635
use ArrayOrTraversableGuardTrait;
3736

38-
/** @var mixed[]|Traversable */
37+
/** @var mixed[] */
3938
protected $objects;
4039

4140
/** @var ?string */

tests/Form/Element/ProxyAwareElementTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ProxyAwareElementTestCase extends TestCase
2222
/** @var MockObject&ClassMetadata */
2323
protected $metadata;
2424

25-
/** @var MockObject */
25+
/** @var object */
2626
protected $element;
2727

2828
/** @var ArrayCollection */

tests/ModuleTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Symfony\Component\Console\Input\InputInterface;
1515
use Symfony\Component\Console\Output\OutputInterface;
1616

17+
use function assert;
18+
use function method_exists;
1719
use function serialize;
1820
use function unserialize;
1921

@@ -110,6 +112,7 @@ public function testGetConsoleUsage(): void
110112
}));
111113

112114
$module = new Module();
115+
assert(method_exists($module, 'getConsoleUsage'));
113116

114117
$module->onBootstrap($this->event);
115118

0 commit comments

Comments
 (0)