#
08b75395 |
| 08-Sep-2022 |
Ilija Tovilo |
Fix syntax error when dnf type in parens after readonly Fixes GH-9500 Closes GH-9512 |
#
f957e3e7 |
| 22-Jul-2022 |
Ilija Tovilo |
Fix arrow function with never return type Fixes GH-7900 Closes GH-9103 |
#
107ad283 |
| 28-Jul-2022 |
Nikita Popov |
Suppress unused-but-set-variable warning in parsers This is very ugly: Bison provides a yynerrs variable, which is usually not actually used, but also not annotated with YY_MAYBE_UNU
Suppress unused-but-set-variable warning in parsers This is very ugly: Bison provides a yynerrs variable, which is usually not actually used, but also not annotated with YY_MAYBE_UNUSED. Suppress this warning by adding a (void)yynerrs into the top-level reduction action. The alternative would be to disable the warning for these generated files.
show more ...
|
#
f9055907 |
| 08-Jul-2022 |
George Peter Banyard |
Add support for Disjoint Normal Form (DNF) types (#8725) RFC: https://wiki.php.net/rfc/dnf_types This allows to combine union and intersection types together in the following form (
Add support for Disjoint Normal Form (DNF) types (#8725) RFC: https://wiki.php.net/rfc/dnf_types This allows to combine union and intersection types together in the following form (A&B)|(X&Y)|T but not of the form (X|A)&(Y|B) or (X|A)&(Y|B)|T. * Improve union type parsing Co-authored-by: Sara Golemon <pollita@php.net>
show more ...
|
#
44cd74b6 |
| 17-Jun-2022 |
Ilija Tovilo |
Fix lineno in backtrace of multi-line function calls Closes GH-8810 Closes GH-8818 |
#
7850c103 |
| 16-May-2022 |
Máté Kocsis |
Add support for readonly classes (#7305) RFC: https://wiki.php.net/rfc/readonly_classes |
#
9a90bd70 |
| 12-Mar-2022 |
Ilija Tovilo |
Deprecate ${} string interpolation https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation |
#
944b6b6b |
| 16-Jan-2022 |
Tyson Andre |
Merge concatenated literal strings while compiling. (#7948) The output of token_get_all is unaffected, so projects such as the userland nikic/php-parser are unaffected. Ext
Merge concatenated literal strings while compiling. (#7948) The output of token_get_all is unaffected, so projects such as the userland nikic/php-parser are unaffected. Extensions such as nikic/php-ast which expose the internal php ast would see literals be flattened, though. This makes php significantly faster at parsing code such as `$x = eval('return ' . var_export(str_repeat("\0", 100), true) . ';');` and avoids the stack overflow from recursing 100000 times in zend_eval_const_expr to process `'' . "\0" . '' . "\0" . ...` Closes GH-7946 * Don't create binary op if unnecessary * Update Zend/zend_ast.c Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
show more ...
|
#
6780aaa5 |
| 02-Jun-2021 |
Nikita Popov |
Implement readonly properties Add support for readonly properties, for which only a single initializing assignment from the declaring scope is allowed. RFC: https://wiki.php.net
Implement readonly properties Add support for readonly properties, for which only a single initializing assignment from the declaring scope is allowed. RFC: https://wiki.php.net/rfc/readonly_properties_v2 Closes GH-7089.
show more ...
|
#
d0b09a7b |
| 20-May-2021 |
Joe Watkins |
Add first-class callables Support acquiring a Closure to a callable using the syntax func(...), $obj->method(...), etc. This is essentially a shortcut for Closure::fromCallable().
Add first-class callables Support acquiring a Closure to a callable using the syntax func(...), $obj->method(...), etc. This is essentially a shortcut for Closure::fromCallable(). RFC: https://wiki.php.net/rfc/first_class_callable_syntax Closes GH-7019. Co-Authored-By: Nikita Popov <nikita.ppv@gmail.com>
show more ...
|
#
069a9fa5 |
| 05-Jul-2021 |
George Peter Banyard |
Pure Intersection types (#6799) Implement pure intersection types RFC RFC: https://wiki.php.net/rfc/pure-intersection-types Co-authored-by: Nikita Popov <nikic@php.net>
Pure Intersection types (#6799) Implement pure intersection types RFC RFC: https://wiki.php.net/rfc/pure-intersection-types Co-authored-by: Nikita Popov <nikic@php.net> Co-authored-by: Ilija Tovilo <ilutov@php.net>
show more ...
|
#
724230d9 |
| 24-May-2021 |
DannyS712 <46829944+DannyS712@users.noreply.github.com> |
zend_language_parser.y: Fix a documentation typo "loading" should be "leading" when discussing separators in namespace names |
#
d60bc0e2 |
| 14-May-2021 |
Tyson Andre |
Support doc comments on enum cases (#6984) Because php supports doc comments on class constants, I believe it would also make sense to support them on enum cases. I don't have s
Support doc comments on enum cases (#6984) Because php supports doc comments on class constants, I believe it would also make sense to support them on enum cases. I don't have strong opinions about whether attributes should be moved to be the last element or whether the doc comment should go after the attribute, but the ast will likely change again before php 8.1 is stable. So far, all attributes are the last ast child node. I didn't notice that doc comments weren't implemented due to https://github.com/php/php-src/pull/6489 being a large change. https://wiki.php.net/rfc/enumerations did not mention whether or not doc comments were meant to be supported
show more ...
|
#
462da6e0 |
| 31-Mar-2021 |
Josh Soref |
Fix spelling and grammar mistakes This PR corrects misspellings identified by the check-spelling action. The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465
Fix spelling and grammar mistakes This PR corrects misspellings identified by the check-spelling action. The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465 The action reports that the changes in this PR would make it happy: jsoref@602417c Closes GH-6822.
show more ...
|
#
269c8dac |
| 10-Jun-2020 |
Ilija Tovilo |
Implement enums RFC: https://wiki.php.net/rfc/enumerations Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Closes GH-6489. |
#
8b37c1e9 |
| 15-Aug-2020 |
Benjamin Eberlei |
Change Attribute Syntax from @@ to #[] |
#
d92229d8 |
| 06-Apr-2020 |
Nikita Popov |
Implement named parameters From an engine perspective, named parameters mainly add three concepts: * The SEND_* opcodes now accept a CONST op2, which is the argument nam
Implement named parameters From an engine perspective, named parameters mainly add three concepts: * The SEND_* opcodes now accept a CONST op2, which is the argument name. For now, it is looked up by linear scan and runtime cached. * This may leave UNDEF arguments on the stack. To avoid having to deal with them in other places, a CHECK_UNDEF_ARGS opcode is used to either replace them with defaults, or error. * For variadic functions, EX(extra_named_params) are collected and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS. RFC: https://wiki.php.net/rfc/named_params Closes GH-5357.
show more ...
|
#
470d1696 |
| 02-Jul-2020 |
Theodore Brown |
Implement Shorter Attribute Syntax RFC: https://wiki.php.net/rfc/shorter_attribute_syntax Closes GH-5796. Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com> |
#
9bf11983 |
| 24-May-2020 |
Ilija Tovilo |
Implement nullsafe ?-> operator RFC: https://wiki.php.net/rfc/nullsafe_operator Closes GH-5619. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> |
#
7a3dcc3e |
| 15-Jun-2020 |
Nikita Popov |
Treat namespaced names as single token Namespace names are now lexed as single tokens of type T_NAME_QUALIFIED, T_NAME_FULLY_QUALIFIED or T_NAME_RELATIVE. RFC: https://wiki.php.
Treat namespaced names as single token Namespace names are now lexed as single tokens of type T_NAME_QUALIFIED, T_NAME_FULLY_QUALIFIED or T_NAME_RELATIVE. RFC: https://wiki.php.net/rfc/namespaced_names_as_token Closes GH-5827.
show more ...
|
#
4cf8b6f1 |
| 01-Jul-2020 |
Tyson Andre |
Support optional comma in closure use list RFC: https://wiki.php.net/rfc/trailing_comma_in_closure_use_list Discussion: https://externals.io/message/110715 The release manager h
Support optional comma in closure use list RFC: https://wiki.php.net/rfc/trailing_comma_in_closure_use_list Discussion: https://externals.io/message/110715 The release manager has agreed to allow merging of RFCs that have near-unanimous votes. If an RFC ends up not achieving the required 2/3 majority at the time the announced voting period closes, this implementation commit will be reverted in time for the feature freeze. Closes GH-5793
show more ...
|
#
55a15f32 |
| 11-Jun-2020 |
Rowan Tommins |
Improve output of tokens in Parse Errors Currently, unexpected tokens in the parser are shown as the text found, plus the internal token name, including the notorious "unexpected '::
Improve output of tokens in Parse Errors Currently, unexpected tokens in the parser are shown as the text found, plus the internal token name, including the notorious "unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM)". This commit replaces that with a more user-friendly format, with two main types of token: * Tokens which always represent the same text are shown like 'unexpected token "::"' and 'expected "::"' * Tokens which have variable text are given a user-friendly name, and show like 'unexpected identifier "foo"', and 'expected identifer'. A few tokens have special cases: * unexpected token """ -> unexpected double-quote mark * unexpected quoted string "'foo'" -> unexpected single-quoted string "foo" * unexpected quoted string ""foo"" -> unexpected double-quoted string "foo" * unexpected illegal character "_" -> unexpected character 0xNN (where _ is almost certainly a control character, and NN is the hexadecimal value of the byte) The \ token has a special case in the implementation just to stop bison making a mess of escaping it and it coming out as \\
show more ...
|
#
9fa1d133 |
| 09-Apr-2020 |
Ilija Tovilo |
Implement match expression RFC: https://wiki.php.net/rfc/match_expression_v2 Closes GH-5371. |
#
4a0d6901 |
| 06-Jul-2020 |
moliata <7127204+moliata@users.noreply.github.com> |
refactor: class constants parsing As part of my work on typed class constants, I wanted to make a separate pull request for unrelated changes. These include: * Moving
refactor: class constants parsing As part of my work on typed class constants, I wanted to make a separate pull request for unrelated changes. These include: * Moving from ast->child[0]->attr to ast->attr * Making zend_ast_export_ex() export class constants' visibility * Extracting an additional zend_compile_class_const_group() function Closes GH-5812.
show more ...
|
#
6a195cac |
| 02-Jul-2020 |
Nikita Popov |
Treat attribute argument lists like normal argument lists Allow trailing comma. Syntactically allow unpacking, but forbid it during compilation. The trailing comma test-case is
Treat attribute argument lists like normal argument lists Allow trailing comma. Syntactically allow unpacking, but forbid it during compilation. The trailing comma test-case is adopted from GH-5796.
show more ...
|