Skip to content

Commit bcbb503

Browse files
committed
Upgrading note
1 parent a8cd423 commit bcbb503

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

UPGRADING.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,28 @@ PHPStan now requires PHP 7.4 or newer to run.
99

1010
## Upgrading guide for end users
1111

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`.
1334

1435
## Upgrading guide for extension developers
1536

0 commit comments

Comments
 (0)