Nikita Popov
715f4d25e2
Release PHP-Parser 4.19.4
v4.19.4
2024-09-29 17:01:53 +02:00
Nikita Popov
80e6f9b243
Remove accidentally committed Php8 parser
...
Looks like I pulled this in by accident when backporting a change
from the master branch.
2024-09-29 16:58:55 +02:00
Nikita Popov
220f5b3661
Release PHP-Parser 4.19.3
v4.19.3
2024-09-29 16:01:32 +02:00
Nikita Popov
ad38d47247
Avoid negative indendation in formatting-preserving printer
...
Fixes #1015 .
(cherry-picked from 961f158f6da32565e7e3a33e23b8a38941068597)
2024-09-29 15:36:28 +02:00
Nikita Popov
6de6ede1cb
Include trailing semicolon in GroupUse
...
Fixes https://github.com/nikic/PHP-Parser/issues/1026 .
(cherry-picked from aedfcc23cd9ad6b89da179ad95220aec2994b69c)
2024-09-21 15:58:16 +02:00
Nikita Popov
20412455fc
Avoid use of assertObjectHasAttribute()
...
Use isset() to avoid the PHPUnit deprecation warnings. This is
the same as on the master branch.
2024-09-21 15:49:26 +02:00
Nikita Popov
103f95d560
Add PHP 8.4 to CI matrix
...
We don't support parsing PHP 8.4 on 4.x, but everything else
should work.
2024-09-21 15:47:51 +02:00
Nikita Popov
78f289c51f
Use explicit nullability in test
...
Avoid a deprecation warning on PHP 8.4.
2024-09-21 15:46:59 +02:00
Nikita Popov
0f585f0e95
Drop PHPUnit 6
...
As we no longer support PHP 7.0, we don't need PHPUnit 6 anymore.
2024-09-21 15:45:18 +02:00
Nikita Popov
0ed4c8949a
Release PHP-Parser 4.19.2
v4.19.2
2024-09-17 21:36:00 +02:00
Ruud Kamphuis
8a21ec3182
Normalize enum value to ClassConstFetch
...
Fixes #930
2024-08-11 16:55:47 +02:00
Markus Staab
4d36e9c16f
Make phpunit fail on deprecation warnings ( #989 )
2024-03-17 10:03:35 +01:00
Nikita Popov
4e1b88d21c
Release PHP-Parser 4.19.1
v4.19.1
2024-03-17 09:10:35 +01:00
Abdul Malik Ikhsan
d4d4e3e155
Fix deprecated Optional parameter before required parameter on PrintableNewAnonClassNode ( #987 )
...
Fixes https://github.com/nikic/PHP-Parser/issues/986 .
2024-03-17 09:05:57 +01:00
Nikita Popov
32cdab9a03
Release PHP-Parser 4.19.0
v4.19.0
2024-03-16 15:49:31 +01:00
Nikita Popov
c2403aa729
Update minimum PHP version in docs
2024-03-02 18:21:59 +01:00
Sebastian Bergmann
051ad218f8
Do not use implicitly nullable parameters ( #984 )
...
Implicitly nullable parameters will be deprecated in PHP 8.4
(see https://wiki.php.net/rfc/deprecate-implicitly-nullable-types ).
To avoid deprecation warnings, replace all implicitly nullable
parameters with explicit ones. Unfortunately, this also means
that we have to drop support for PHP 7.0.
2024-03-02 18:19:50 +01:00
Nikita Popov
1bcbb2179f
Release PHP-Parser 4.18.0
v4.18.0
2023-12-10 22:03:43 +01:00
Nikita Popov
05c01865ea
Add PHP 8.3 to CI
2023-12-10 21:57:59 +01:00
Ondrej Mirtes
2a5e81f7ca
Fix NameResolver for class constant native type
2023-11-28 20:10:38 +01:00
Nikita Popov
e453389866
Add forward-compatibility ParserFactory methods
...
Add ParserFactory::createForNewestSupportedVersion() and
ParserFactory::createForHostVersion() for forward-compatibility
with PHP-Parser 5. These methods do not accept an externally
constructed lexer and always enable all attributes.
2023-11-12 16:49:53 +01:00
Théo FIDRY
402b6cf345
build: Exclude grammar from export git artifact
2023-11-01 21:31:02 +01:00
xjaja
54103d8387
Don't drop class statements before error ( #952 )
...
When encountering a null statement (indicating that an error occurred),
retain the preceding statements. These were accidentally dropped
previously.
2023-10-03 23:00:18 +02:00
Nikita Popov
a6303e50c9
Release PHP-Parser 4.17.1
v4.17.1
2023-08-13 21:53:39 +02:00
Nikita Popov
44fc92194b
Fix ClassConst::$type phpdoc
...
The property should be nullable, and on 4.x we should convert
string to Identifier.
Fixes #939 .
2023-08-13 21:49:54 +02:00
Nikita Popov
844c228bf2
Release PHP-Parser 4.17.0
v4.17.0
2023-08-13 16:53:08 +02:00
Nikita Popov
6d2584bdf1
Support fixup for dynamic class const name
...
This is new in PHP 8.3.
(cherry picked from commit e9416a0eaec601df910045a6f63361068cffddbf)
2023-08-13 16:46:31 +02:00
Nikita Popov
21a61ece15
Properly handle static deref LHS
...
The rules for static and array/object deref are slightly different:
The former does not allow constants.
(cherry picked from commit 7b4a8c1ebd09fd6f6ccc33d7193df0f75e7e28d7)
2023-08-13 16:46:25 +02:00
Nikita Popov
8f8e47b6c1
Support new variables in fixup
...
(cherry picked from commit 6a88bdb05a169fcd38c2ed1e6cf129a5e9d51cf0)
2023-08-13 16:41:25 +02:00
Nikita Popov
0aad06bce3
Fix logic for new operand parentheses requirement
...
We need to perform this check recursively.
(cherry picked from commit cc34c2450c50504b7b3aaa36dfd6276eb9be77d8)
2023-08-13 16:36:00 +02:00
Nikita Popov
80a680bf59
Properly handle new/instanceof operand restrictions
...
Fixes #912 .
(cherry picked from commit 1eb6b5653eb7aeb9e12d2bbbaa8b8f698528e0a2)
2023-08-13 16:35:51 +02:00
Nikita Popov
cfc54e30a4
[PHP 8.3] Support dynamic class const fetch
...
RFC: https://wiki.php.net/rfc/dynamic_class_constant_fetch
2023-07-30 23:38:32 +02:00
Nikita Popov
05e84f7201
Support readonly anonymous classes
2023-07-30 23:38:32 +02:00
Nikita Popov
73ccbabbe7
Add support for typed constants
...
RFC: https://wiki.php.net/rfc/typed_class_constants
2023-07-30 23:38:32 +02:00
Nikita Popov
19526a33fb
Release PHP-Parser 4.16.0
v4.16.0
2023-06-25 16:52:30 +02:00
Danny van der Sluijs
1d0748ad35
Update main.yml to use GitHub Actions V3
...
Updates the GitHub Actions from V2 to V3
2023-06-24 16:59:08 +01:00
Nikita Popov
c9e5a13d68
Add Name::getParts(), deprecate Name::$parts
...
In preparation for switching this to a plain string in
PHP-Parser 5, deprecate direct access to the property and
provide an API that will work on both versions.
2023-05-21 21:22:47 +02:00
PavelSPN
ba788aa98b
Remove redundant parameter
...
Closes #920 .
2023-05-19 22:26:12 +02:00
Nikita Popov
11e2663a5b
Release PHP-Parser 4.15.5
v4.15.5
2023-05-19 22:20:00 +02:00
Nikita Popov
11e2dcd96c
Add makeReadonly() to param builder
2023-05-19 22:17:09 +02:00
Cees-Jan Kiewiet
0ffddce52d
[4.x] Add constructor property promotion
...
By making flags on the Param builder configurable by providing make(Public|Protected|Private) methods we can promote parameters to properties from the constructor
2023-03-06 23:12:36 +01:00
Nikita Popov
6bb5176bc4
Release PHP-Parser 4.15.4
v4.15.4
2023-03-05 20:49:14 +01:00
Nikita Popov
cad49f8ed3
Fix formatting preservation for alternative elseif/else syntax
...
Test taken from PR #797 .
(cherry picked from commit 9b46dffb12c6c83d33b993ae81b9a2895293dee8)
2023-03-05 20:44:50 +01:00
Nikita Popov
570e980a20
Release PHP-Parser 4.15.3
v4.15.3
2023-01-16 23:05:37 +01:00
Nikita Popov
a50b4310f7
Test PHP 8.2 in CI
2023-01-16 22:27:18 +01:00
Nikita Popov
8863f92b58
Support readonly before DNF type
...
This makes us match the PHP 8.2 handling of readonly. Handling of
"readonly" functions is moved to the parser to allow distinguishing
them from readonly properties with DNF types. We have to uglify the
grammar to avoid some shift/reduce conflicts. Thank you WordPress.
(cherry-picked from 0dd85ebd34d7463d53ec92035105b04799a687e1)
2023-01-16 22:19:17 +01:00
Nikita Popov
3182d12b55
Fix attrGroups/attributes confusion in EnumCase builder
...
Found by staabm in #907 .
(cherry picked from commit 21a3e8cac52b1d3d0ea0e91c34d112cf53716732)
2022-12-14 21:51:15 +01:00
AlessandroMinoccheri
1df465cd90
added type int to argument of addAlias function
2022-11-13 16:33:17 +01:00
Nikita Popov
f59bbe44bf
Release PHP-Parser 4.15.2
v4.15.2
2022-11-12 16:38:23 +01:00
Nikita Popov
2e11deec46
Bail out on PHP tags in removed code
...
If dropping a node would drop PHP tags, bail out of formatting
preservation. This will lose formatting, but at least produce
legal code.
Closes GH-884.
(cherry picked from commit b0edd4c41111042d43bb45c6c657b2e0db367d9e)
2022-11-12 16:33:34 +01:00