Skip to content

Commit

Permalink
Upgrading note
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 14, 2024
1 parent a8cd423 commit bcbb503
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,28 @@ PHPStan now requires PHP 7.4 or newer to run.

## Upgrading guide for end users

TODO
The best way do get ready for upgrade to PHPStan 2.0 is to update to the **latest PHPStan 1.12 release**
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.

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`:

```json
"require-dev": {
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-doctrine": "^2.0",
"phpstan/phpstan-nette": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpstan/phpstan-symfony": "^2.0",
"phpstan/phpstan-webmozart-assert": "^2.0",
...
}
```

Don't forget to update [3rd party PHPStan extensions](https://phpstan.org/user-guide/extension-library) as well.

After changing your `composer.json`, run `composer update 'phpstan/*' -W`.

## Upgrading guide for extension developers

Expand Down

0 comments on commit bcbb503

Please # to comment.