Skip to content

Commit c7630a7

Browse files
committed
qa: add Psalm and its PHPUnit plugin as dev requirements
Also provide initial configuration for Psalm. Signed-off-by: Matthew Weier O'Phinney <[email protected]>
1 parent 9b1f484 commit c7630a7

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
},
4343
"require-dev": {
4444
"doctrine/dbal": "^2.12.1 || ^3.0.0",
45-
"doctrine/orm": "^2.7.5",
4645
"doctrine/doctrine-mongo-odm-module": "^1.0 || ^2.0.2 || ^3.0.2",
4746
"doctrine/doctrine-orm-module": "^2.1.3",
47+
"doctrine/orm": "^2.7.5",
4848
"laminas-api-tools/api-tools-provider": "^1.2",
4949
"laminas/laminas-coding-standard": "~2.1.4",
5050
"laminas/laminas-i18n": "^2.7.3",
@@ -53,7 +53,9 @@
5353
"laminas/laminas-test": "^2.6.1 || ^3.0.1",
5454
"phpspec/prophecy-phpunit": "^2.0",
5555
"phpunit/phpunit": "^9.5.0",
56-
"symfony/yaml": "^2.3 || ^3.0 || ^4.0"
56+
"psalm/plugin-phpunit": "^0.15",
57+
"symfony/yaml": "^2.3 || ^3.0 || ^4.0",
58+
"vimeo/psalm": "^4.7"
5759
},
5860
"suggest": {
5961
"doctrine/doctrine-mongo-odm-module": "^1.0 || ^2.0.2 || ^3.0.2, if you wish to use the Doctrine ODM",

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

psalm.xml.dist

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
totallyTyped="true"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns="https://getpsalm.org/schema/config"
6+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
7+
errorBaseline="psalm-baseline.xml"
8+
>
9+
<projectFiles>
10+
<directory name="config"/>
11+
<directory name="src"/>
12+
<directory name="test"/>
13+
<ignoreFiles>
14+
<directory name=".github"/>
15+
<directory name="vendor"/>
16+
</ignoreFiles>
17+
</projectFiles>
18+
19+
<issueHandlers>
20+
<InternalMethod>
21+
<errorLevel type="suppress">
22+
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::method"/>
23+
</errorLevel>
24+
<errorLevel type="suppress">
25+
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willReturn"/>
26+
</errorLevel>
27+
<errorLevel type="suppress">
28+
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::with"/>
29+
</errorLevel>
30+
</InternalMethod>
31+
</issueHandlers>
32+
<plugins>
33+
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
34+
</plugins>
35+
</psalm>

0 commit comments

Comments
 (0)