Skip to content

Commit 22ef73a

Browse files
authored
Updating phpstan to 2.0 (#47)
* Updating phpstan to 2.0 * Adding PHP 8.3/8.4 everywhere
1 parent f7e6dfd commit 22ef73a

File tree

4 files changed

+58
-4
lines changed

4 files changed

+58
-4
lines changed

.drone.jsonnet

+3-1
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

+43-2
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: 78dd0859d7372f750bfddf9d6815094d46108ba147c95e1b247f6cf1c151e67d
154+
hmac: 50e611b8cff9b2ad27cc5346664bdca0f8a1c3e0629a8325d986f02649dd632e
114155

115156
...

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"require-dev": {
1717
"phpunit/phpunit": "^9.5.28",
1818
"squizlabs/php_codesniffer": "^3.7.2",
19-
"phpstan/phpstan": "^1.10.7",
19+
"phpstan/phpstan": "^2.0",
20+
"phpstan/phpstan-deprecation-rules": "^2.0",
2021
"phan/phan": "^5.4.2"
2122
},
2223
"autoload": {

phpstan.neon

+10
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)