38 Commits

Author SHA1 Message Date
Nikita Popov
d619c8b4e6 Fix typo in upgrading guide
Fixes #973.
2024-01-09 20:23:09 +01:00
Nikita Popov
5cc5a67004 Upgrading guide tweaks 2024-01-07 18:11:19 +01:00
Nikita Popov
f82a6365a5 Add upgrading nodes for changes since beta1
Fixes #965.
Fixes #966.
2023-12-20 21:36:53 +01:00
Ondřej Mirtes
13a41f05a7 Fix typos in UPGRADE-5.0.md 2023-12-17 21:03:53 +01:00
Nikita Popov
d8e8065313 Don't parse unicode escapes for PHP < 7.0
We still had the option for this but were hardcoding it to true.
Make it conditional on the PHP version instead.
2023-09-23 17:35:51 +02:00
Nikita Popov
ea5ba26749 Add upgrading notes for lexer changes 2023-09-17 20:17:54 +02:00
Nikita Popov
1873020bf7 Deprecate Node::getLine() in favor of Node::getStartLine() 2023-09-17 16:32:10 +02:00
Nikita Popov
1b346f7935 Remove deprecated Comment methods 2023-09-17 16:30:28 +02:00
Nikita Popov
5da5231fde Indent heredoc/nowdoc when targeting PHP >= 7.3 2023-08-27 22:02:31 +02:00
Nikita Popov
8d58380108 Default pretty printer to PHP 7.4 2023-08-27 21:26:47 +02:00
Nikita Popov
ee3e7db3fc Raise minimum PHP version to PHP 7.4 2023-08-16 21:06:38 +02:00
Nikita Popov
69993a181a Update CHANGELOG and UPGRADING 2023-05-27 16:26:36 +02:00
Nikita Popov
4ce0de2d12 Use PHP 7.1 as default pretty printer target 2023-03-05 16:56:50 +01:00
Nikita Popov
8fb716841e Update upgrading documentation 2023-03-05 10:49:24 +01:00
Nikita Popov
4917c71a91 Rename Stmt\UseUse to UseItem 2022-09-03 18:59:48 +02:00
Nikita Popov
e1345f0c09 Rename Stmt\PropertyProperty to PropertyItem 2022-09-03 18:55:22 +02:00
Nikita Popov
03ccfa3dd4 Rename Stmt\DeclareDeclare to DeclareItem 2022-09-03 18:45:28 +02:00
Nikita Popov
a44faa6328 Rename Scalar\Encapsed to Scalar\InterpolatedString 2022-09-03 15:14:04 +02:00
Nikita Popov
f4ec6a1e53 Rename Scalar\EncapsedStringPart to InterpolatedStringPart
It is no longer an expression node, which unfortunately does
require a more awkward type for the Encaps node.
2022-09-03 13:25:23 +02:00
Nikita Popov
23835d20ef Rename Scalar\LNumber to Scalar\Int_ 2022-09-03 12:07:38 +02:00
Nikita Popov
66b20bd6bc Rename Scalar\DNumber to Scalar\Float_ 2022-09-03 11:56:06 +02:00
Nikita Popov
035c1c7cd2 Rename Stmt\StaticVar to StaticVar
This is part of a statement, not a statement by itself.
2022-09-02 22:51:13 +02:00
Nikita Popov
8be56afd2d Rename Expr\ArrayItem to ArrayItem
Array items are not expressions by themselves.
2022-09-02 22:41:10 +02:00
Nikita Popov
f62b2bfdec Introduce separate Modifiers class
Use PhpParser\Modifiers::PUBLIC instead of
PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC, etc. Old constants
of course remain available.

Fixes #476.
2022-08-28 21:20:26 +02:00
Nikita Popov
68fc1ba4cb Always use List_ node for array destructuring
Fixes #471.
2022-08-28 18:48:26 +02:00
Nikita Popov
e61bb11989 Add additional upgrading notes for pretty printer 2022-07-24 23:06:20 +02:00
Nikita Popov
1e89658cae Add PhpVersion class 2022-07-23 17:52:59 +02:00
Nikita Popov
b0469d127e Rename Expr\ClosureUse -> ClosureUse
This is not a real expression, treat it similarly to Node\Arg
or Node\Param.

The old name is retained as an alias for compatibility.
2022-06-12 21:55:56 +02:00
Nikita Popov
23be1f9bd1 Update doc references 2022-06-12 21:18:11 +02:00
Nikita Popov
3fd30f64bc Remove deprecated param builder method 2022-06-12 21:14:22 +02:00
Nikita Popov
55f29b152c Improve ParserFactory version targeting
Most users will want to pick createForNewestSupportedVersion()
or getForHostVersion(). The currently default is the former,
which can lead to unwanted surprised due to PHP BC breaks for
users that actually want the latter. Make this choice more
explicit.
2022-06-12 18:56:18 +02:00
Nikita Popov
d3d1297c0d Remove PHP 5 parser 2022-06-12 18:18:50 +02:00
Nikita Popov
aff98bbf16 Use PHP 8.0 token representation
Migrate everything to use PhpToken-compatible token representation,
rather than the legacy array/string representation.
2022-06-05 17:44:42 +02:00
Nikita Popov
27fe7a68c0 Include space after closure use 2022-06-04 13:22:58 +02:00
Dominik Peters
6c0b63d9af Change print order of modifiers
Print abstract/final before visibility modifiers, in line with
PSR-12.

Closes #826.
2022-06-04 13:19:07 +02:00
Nikita Popov
87387caf8f Remove space before return type in pretty printer 2022-06-04 13:01:02 +02:00
Nikita Popov
5466ee365f Drop support for running on PHP 7.0 2022-06-04 12:27:41 +02:00
Nikita Popov
1f416d9052 Target PHP-Parser 5.0 2022-06-04 12:20:42 +02:00