Skip to content

Commit c447d32

Browse files
committed
UPGRADING guide WIP
1 parent 64d4a3b commit c447d32

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

.github/workflows/phar.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ jobs:
211211
env:
212212
GPG_ID: ${{ steps.import-gpg.outputs.fingerprint }}
213213

214+
- name: "cp UPGRADING.md"
215+
run: cp phpstan-src/UPGRADING.md phpstan-dist/UPGRADING.md
216+
214217
- name: "Verify PHAR"
215218
working-directory: phpstan-dist
216219
run: "gpg --verify phpstan.phar.asc"

UPGRADING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
This document is a work in progress.
2+
3+
Upgrading from PHPStan 1.x to 2.0
4+
=================================
5+
6+
## PHP version requirements
7+
8+
PHPStan now requires PHP 7.4 or newer to run.
9+
10+
## Upgrading guide for end users
11+
12+
TODO
13+
14+
## Upgrading guide for extension developers
15+
16+
### PHPStan now uses nikic/php-parser v5
17+
18+
See [UPGRADING](https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md) guide for PHP-Parser.
19+
20+
The most notable change is how `throw` statement is represented. Previously, `throw` statements like `throw $e;` were represented using the `Stmt\Throw_` class, while uses inside other expressions (such as `$x ?? throw $e`) used the `Expr\Throw_` class.
21+
22+
Now, `throw $e;` is represented as a `Stmt\Expression` that contains an `Expr\Throw_`. The
23+
`Stmt\Throw_` class has been removed.
24+
25+
### PHPStan now uses phpstan/phpdoc-parser v2
26+
27+
See [UPGRADING](https://github.com/phpstan/phpdoc-parser/blob/2.0.x/UPGRADING.md) guide for phpstan/phpdoc-parser.
28+
29+
TODO

changelog-2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
This document is a work in progress.
22

3-
When PHPStan 2.0 gets released, this will turn into [releases notes on GitHub](https://github.com/phpstan/phpstan/releases) + a separate UPGRADING document.
3+
When PHPStan 2.0 gets released, this will turn into [releases notes on GitHub](https://github.com/phpstan/phpstan/releases) + a separate [UPGRADING](./UPGRADING.md) document.
44

55
Major new features 🚀
66
=====================

0 commit comments

Comments
 (0)