| 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.
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | | |
calling __construct after instantiation
|
| | |
| | |
| | |
| | |
| | |
| | | |
xsl, zip, Zend
Closes GH-6706
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When a method is inherited, the static variables will now always
use the initial values, rather than the values at the time of
inheritance. As such, behavior no longer depends on whether
inheritance happens before or after a method has been called.
This is implemented by always keeping static_variables as the
original values, and static_variables_ptr as the modified copy.
Closes GH-6705.
|
| | |
| | |
| | |
| | | |
Related to GH-6701
|
| | |
| | |
| | |
| | |
| | | |
These are read-only properties, and Reflection makes sure to assign
only strings.
|
| | |
| | |
| | |
| | |
| | |
| | | |
reflection, session, shmop
Closes GH-6692
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a new transparent technology that eliminates overhead of PHP class inheritance.
PHP classes are compiled and cached (by opcahce) separately, however their "linking" was done at run-time - on each request. The process of "linking" may involve a number of compatibility checks and borrowing methods/properties/constants form parent and traits. This takes significant time, but the result is the same on each request.
Inheritance Cache performs "linking" for unique set of all the depending classes (parent, interfaces, traits, property types, method types involved into compatibility checks) once and stores result in opcache shared memory. As a part of the this patch, I removed limitations for immutable classes (unresolved constants, typed properties and covariant type checks). So now all classes stored in opcache are "immutable". They may be lazily loaded into process memory, if necessary, but this usually occurs just once (on first linking).
The patch shows 8% improvement on Symphony "Hello World" app.
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.
Of course, zend_bool is retained as an alias.
|
| |
| |
| |
| | |
We cannot `RETURN_THROWS()` here, since `return_value` is not defined.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
If `zval_update_constant_ex()` fails, an exception has already been
thrown, so we clarify that in the implementation as well.
Closes GH-6557.
|
|\ \
| |/
| |
| |
| | |
* 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.
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit ef6adb4e27853eb19bf50bad6486311920d6af7b.
Per Ondrej's comment, this is already being used by BetterReflection
adaptors, ugh.
|
| |
| |
| |
| | |
Closes GH-6384
|
| |
| |
| |
| | |
Closes GH-6376
|
| | |
|
| | |
|
| |
| |
| |
| | |
Closes GH-6214.
|
| | |
|
| |
| |
| |
| | |
Closes GH-6230
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make ReflectionAttribute::newInstance() respect the strict_types=1
declaration at the attribute use-site. More generally, pretend that
we are calling the attribute constructor from the place where the
attribute is used, which also means that the attribute location will
show up properly in backtraces and inside "called in" error information.
This requires us to store the attributes strict_types scope (as flags),
as well as the attribute line number. The attribute filename can be
recovered from the symbol it is used on. We might want to expose the
attribute line number via reflection as well.
See also https://externals.io/message/111915.
Closes GH-6201.
|
| |
| |
| |
| | |
Closes GH-6170
|
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.
Closes GH-6112
|
| |
| |
| |
| | |
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
|
| | |
|
| | |
|