You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UPGRADING.md
+22-1Lines changed: 22 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,28 @@ PHPStan now requires PHP 7.4 or newer to run.
9
9
10
10
## Upgrading guide for end users
11
11
12
-
TODO
12
+
The best way do get ready for upgrade to PHPStan 2.0 is to update to the **latest PHPStan 1.12 release**
13
+
and enable [**Bleeding Edge**](https://phpstan.org/blog/what-is-bleeding-edge). This will enable the new rules and behaviours that 2.0 turns on for all users.
14
+
15
+
Once you get to a green build with no deprecations showed on latest PHPStan 1.12.x with Bleeding Edge enabled, you can update all your related PHPStan dependencies to 2.0 in `composer.json`:
16
+
17
+
```json
18
+
"require-dev": {
19
+
"phpstan/phpstan": "^2.0",
20
+
"phpstan/phpstan-deprecation-rules": "^2.0",
21
+
"phpstan/phpstan-doctrine": "^2.0",
22
+
"phpstan/phpstan-nette": "^2.0",
23
+
"phpstan/phpstan-phpunit": "^2.0",
24
+
"phpstan/phpstan-strict-rules": "^2.0",
25
+
"phpstan/phpstan-symfony": "^2.0",
26
+
"phpstan/phpstan-webmozart-assert": "^2.0",
27
+
...
28
+
}
29
+
```
30
+
31
+
Don't forget to update [3rd party PHPStan extensions](https://phpstan.org/user-guide/extension-library) as well.
32
+
33
+
After changing your `composer.json`, run `composer update 'phpstan/*' -W`.
0 commit comments