Skip to content

Commit 407b486

Browse files
authored
Merge pull request #63 from weierophinney/feature/psalm
Switch from PHPStan to Psalm
2 parents 2b2075e + 8b2ed15 commit 407b486

31 files changed

+1405
-482
lines changed

.laminas-ci.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
2+
"additional_composer_arguments": [
3+
"--no-scripts",
4+
"--no-plugins"
5+
],
26
"ignore_php_platform_requirements": {
3-
"8.1": true
7+
"8.0": false,
8+
"8.1": false
49
}
510
}

.laminas-ci/pre-run.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
# Due to the fact that we are disabling plugins when installing/updating/downgrading composer dependencies
4+
# we have to manually enable the coding standard here.
5+
composer enable-codestandard

composer.json

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,19 @@
5858
"jsoumelidis/zend-sf-di-config": "^0.5",
5959
"laminas/laminas-coding-standard": "~2.3.0",
6060
"laminas/laminas-development-mode": "^3.3.0",
61-
"laminas/laminas-pimple-config": "^1.1.1",
61+
"laminas/laminas-pimple-config": "^1.4",
6262
"laminas/laminas-servicemanager": "^3.6.4",
6363
"mezzio/mezzio-fastroute": "^3.2.0",
6464
"mezzio/mezzio-laminasrouter": "^3.1.0",
6565
"mezzio/mezzio-laminasviewrenderer": "^2.3.0",
6666
"mezzio/mezzio-platesrenderer": "^2.3.0",
67-
"mezzio/mezzio-tooling": "^2.0",
67+
"mezzio/mezzio-tooling": "^2.1",
6868
"mezzio/mezzio-twigrenderer": "^2.7.0",
69-
"mikey179/vfsstream": "^1.6.8",
70-
"phpspec/prophecy": "^1.10.3",
71-
"phpspec/prophecy-phpunit": "^2.0",
72-
"phpstan/phpstan": "^0.12",
73-
"phpstan/phpstan-strict-rules": "^0.12",
74-
"phpunit/phpunit": "^9.5.5",
75-
"roave/security-advisories": "dev-master"
69+
"mikey179/vfsstream": "^1.6.10",
70+
"phpunit/phpunit": "^9.5.11",
71+
"psalm/plugin-phpunit": "^0.16.1",
72+
"roave/security-advisories": "dev-master",
73+
"vimeo/psalm": "^4.17"
7674
},
7775
"autoload": {
7876
"psr-4": {
@@ -98,13 +96,18 @@
9896
"mezzio": "laminas --ansi",
9997
"check": [
10098
"@cs-check",
101-
"@test",
102-
"@analyze"
99+
"@test"
103100
],
104-
"analyze": "phpstan analyze -l 3 -c ./phpstan.installer.neon ./src ./config",
105101
"clear-config-cache": "php bin/clear-config-cache.php",
106-
"cs-check": "phpcs -s",
107-
"cs-fix": "phpcbf",
102+
"enable-codestandard": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run",
103+
"cs-check": [
104+
"@enable-codestandard",
105+
"phpcs -s"
106+
],
107+
"cs-fix": [
108+
"@enable-codestandard",
109+
"phpcbf"
110+
],
108111
"serve": "php -S 0.0.0.0:8080 -t public/",
109112
"test": "phpunit --colors=always",
110113
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"

0 commit comments

Comments
 (0)