Skip to content

Commit e33cf9a

Browse files
authored
Updating phpstan to 2.0 (#51)
* Updating phpstan to 2.0 * Adding PHP 8.3/8.4 everywhere
1 parent 919a3d9 commit e33cf9a

File tree

4 files changed

+58
-4
lines changed

4 files changed

+58
-4
lines changed

.drone.jsonnet

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ local pipeline(name, phpversion, params) = {
7777
depends: [ "composer" ],
7878
failure: "ignore",
7979
commands: [
80-
"vendor/bin/phpstan analyse src",
80+
"./vendor/bin/phpstan",
8181
]
8282
},
8383
{
@@ -103,4 +103,6 @@ local pipeline(name, phpversion, params) = {
103103
pipeline("8.1 lowest", "8.1", "--prefer-stable --prefer-lowest"),
104104
pipeline("8.1", "8.1", "--prefer-stable"),
105105
pipeline("8.2", "8.2", "--prefer-stable"),
106+
pipeline("8.3", "8.3", "--prefer-stable"),
107+
pipeline("8.4", "8.4", "--prefer-stable"),
106108
]

.drone.yml

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ steps:
2424
image: joomlaprojects/docker-images:php8.1-ast
2525
name: phan
2626
- commands:
27-
- vendor/bin/phpstan analyse src
27+
- ./vendor/bin/phpstan
2828
depends:
2929
- composer
3030
failure: ignore
@@ -109,7 +109,48 @@ volumes:
109109
path: /tmp/composer-cache
110110
name: composer-cache
111111
---
112+
kind: pipeline
113+
name: PHP 8.3
114+
steps:
115+
- commands:
116+
- php -v
117+
- composer update --prefer-stable
118+
image: joomlaprojects/docker-images:php8.3
119+
name: composer
120+
volumes:
121+
- name: composer-cache
122+
path: /tmp/composer-cache
123+
- commands:
124+
- vendor/bin/phpunit
125+
failure: ignore
126+
image: joomlaprojects/docker-images:php8.3
127+
name: PHPUnit
128+
volumes:
129+
- host:
130+
path: /tmp/composer-cache
131+
name: composer-cache
132+
---
133+
kind: pipeline
134+
name: PHP 8.4
135+
steps:
136+
- commands:
137+
- php -v
138+
- composer update --prefer-stable
139+
image: joomlaprojects/docker-images:php8.4
140+
name: composer
141+
volumes:
142+
- name: composer-cache
143+
path: /tmp/composer-cache
144+
- commands:
145+
- vendor/bin/phpunit
146+
image: joomlaprojects/docker-images:php8.4
147+
name: PHPUnit
148+
volumes:
149+
- host:
150+
path: /tmp/composer-cache
151+
name: composer-cache
152+
---
112153
kind: signature
113-
hmac: 359f132c744f714b1f25b942977ed4e7b71d08b578b028134469f9d7546c5a88
154+
hmac: c2a8a81e44011086f9f921bbc07769c0c52e98715b70002ef06da1d8fbca08e9
114155

115156
...

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"joomla/test": "^3.0",
1515
"phpunit/phpunit": "^9.5.28",
1616
"squizlabs/php_codesniffer": "^3.7.2",
17-
"phpstan/phpstan": "^1.10.7",
17+
"phpstan/phpstan": "^2.0",
18+
"phpstan/phpstan-deprecation-rules": "^2.0",
1819
"phan/phan": "^5.4.2"
1920
},
2021
"conflict": {

phpstan.neon

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
includes:
3+
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
4+
5+
parameters:
6+
level: 5
7+
phpVersion: 80100
8+
reportUnmatchedIgnoredErrors: false
9+
paths:
10+
- src

0 commit comments

Comments
 (0)