| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
RFC: https://wiki.php.net/rfc/enumerations
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Closes GH-6489.
|
|
|
|
|
|
| |
xsl, zip, Zend
Closes GH-6706
|
|
|
|
|
| |
These are read-only properties, and Reflection makes sure to assign
only strings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This deprecates passing null to non-nullable scale arguments of
internal functions, with the eventual goal of making the behavior
consistent with userland functions, where null is never accepted
for non-nullable arguments.
This change is expected to cause quite a lot of fallout. In most
cases, calling code should be adjusted to avoid passing null. In
some cases, PHP should be adjusted to make some function arguments
nullable. I have already fixed a number of functions before landing
this, but feel free to file a bug if you encounter a function that
doesn't accept null, but probably should. (The rule of thumb for
this to be applicable is that the function must have special behavior
for 0 or "", which is distinct from the natural behavior of the
parameter.)
RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
Closes GH-6475.
|
|\
| |
| |
| |
| | |
* PHP-7.4:
Fix usage of casted string in ReflectionParameter ctor
|
| |
| |
| |
| | |
Fixes oss-fuzz #27755.
|
| |
| |
| |
| | |
Closes GH-6428.
|
| |
| |
| |
| |
| | |
The default value is part of the op_array in that case, but we have
no way to access it. Fail gracefully.
|
| |
| |
| |
| | |
The must_wrap was leaking across iterations.
|
| |
| |
| |
| | |
Closes GH-6376
|
| | |
|
| | |
|
| |
| |
| |
| | |
Closes GH-6214.
|
| | |
|
| |
| |
| |
| | |
Closes GH-6230
|
| |
| |
| |
| | |
Closes GH-6173
|
| |
| |
| |
| |
| | |
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
| |
| |
| |
| |
| |
| |
| | |
ReflectionReference::fromArrayElement(array $array, int|string $key): ?ReflectionReference
is going to be its official signature for PHP 8.0.
Closes GH-5651
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* The array "subject" of a function gets called $array.
* Further parameters should be self-descriptive if used
as a named parameter, and a full word, not an abbreviation.
* If there is a "bunch more arrays" variadic, it gets
called $arrays (because that's what was already there).
* A few functions have a variadic "a bunch more arrays,
and then a callable", and were already called $rest.
I left those as is and died a little inside.
* Any callable provided to an array function that acts
on the array is called $callback. (Nearly all were already,
I just fixed the one or two outliers.)
* array_multisort() is beyond help so I ran screaming.
|
| |
| |
| |
| | |
Closes GH-6098
|
| |
| |
| |
| |
| |
| |
| | |
The second and third arguments are not always the sort_order and
sort_flags -- they can also be in reverse order, or be arrays
altogether. Move them into the variadic parameter to avoid awkward
error messages.
|
| |
| |
| |
| | |
Closes GH-5999
|
| |
| |
| |
| | |
We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix leak on consteval exception in ReflectionClass::__toString()
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Check update constant failure in ReflectionClassConstant::__toString()
|
| | |
|
| |
| |
| |
| |
| |
| | |
"Fix" in the sense of "not crash". We aren't able to actually
display the default value for this case, as there's no way to
fetch the relevant information right now.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is targeting 8.0.
`$arg` seems like a poor choice of a name,
especially if the function were to have arguments added.
In many cases, the php.net documentation already has $array for these functions.
E.g. https://www.php.net/manual/en/function.array-intersect.php
I'd assume that since named arguments was added to 8.0 near the feature freeze,
PHP's maintainers had planned to make the names consistent
and gradually use the same name for docs and implementation.
|
| |
| |
| |
| | |
Closes GH-5958
|
| | |
|
| |
| |
| |
| | |
Related to GH-5627
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
RFC: https://wiki.php.net/rfc/saner-numeric-strings
This removes the -1 allow_error mode from is_numeric_string functions and replaces it by
a trailing boolean out argument to preserve BC in a couple of places.
Most of the changes can be resumed to "numeric" strings which emitted a E_NOTICE now emit
a E_WARNING and "numeric" strings which emitted a E_WARNING now throw a TypeError.
This mostly affects:
- String offsets
- Arithmetic operations
- Bitwise operations
Closes GH-5762
|
| | |
|
| |
| |
| |
| | |
Closes GH-5850
|
| | |
|
| |
| |
| |
| |
| |
| | |
RFC: https://wiki.php.net/rfc/string_to_number_comparison
Closes GH-3886.
|
| |
| |
| |
| |
| |
| | |
Bug that regularly sneaks in: ZEND_ACC_FINAL is set before calling
zend_register_internal_class() and promptly gets ignored. Remove
this footgun by preserving flags from the original CE.
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fixed bug #79820
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Similar to what is done for ReflectionType itself, copy the
type name stored inside ReflectionProperty. Also make sure the
type field is always initialized for dynamic properties.
This is a non-issue in PHP 8, because we store a pointer to the
property_info there, rather than a copy.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 \\
|
| |
| |
| |
| | |
Closes GH-5590
|
| |
| |
| |
| | |
Exposed in Symfony due to exit changes.
|
| |
| |
| |
| | |
Closes GH-5779
|
| |
| |
| |
| | |
Closes GH-5759
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix #69804: ::getStaticPropertyValue() throws on protected props
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`ReflectionClass` allows reading of the values of private and protected
constants, and also to get private and protected static methods.
Therefore getting the values of private and protected static properties
is also permissible, especially since `::getStaticProperties()` already
allows to do so.
We also allow ::setStaticPropertyValue() to modify private and
protected properties, because otherwise this method is useless, as
modifying public properties can be done directly.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix #79487: ::getStaticProperties() ignores property modifications
|