#
9f29e2d7 |
| 05-Jul-2022 |
Bob Weinand |
Allow for arbitrary (class) attributes in stubs This can be easily extended to other types of attributes. Closes #8839.
|
#
efc8f0eb |
| 17-Jun-2022 |
Arnaud Le Blanc |
Deprecate zend_atol() / add zend_ini_parse_quantity() (#7951) Add zend_ini_parse_quantity() and deprecate zend_atol(), zend_atoi() zend_atol() and zend_atoi() don't just do number p
Deprecate zend_atol() / add zend_ini_parse_quantity() (#7951) Add zend_ini_parse_quantity() and deprecate zend_atol(), zend_atoi() zend_atol() and zend_atoi() don't just do number parsing. They also check for a 'K', 'M', or 'G' at the end of the string, and multiply the parsed value out accordingly. Unfortunately, they ignore any other non-numerics between the numeric component and the last character in the string. This means that numbers such as the following are both valid and non-intuitive in their final output. * "123KMG" is interpreted as "123G" -> 132070244352 * "123G " is interpreted as "123 " -> 123 * "123GB" is interpreted as "123B" -> 123 * "123 I like tacos." is also interpreted as "123." -> 123 Currently, in php-src these functions are used only for parsing ini values. In this change we deprecate zend_atol(), zend_atoi(), and introduce a new function with the same behavior, but with the ability to report invalid inputs to the caller. The function's name also makes the behavior less unexpected: zend_ini_parse_quantity(). Co-authored-by: Sara Golemon <pollita@php.net>
show more ...
|
#
b1223ee3 |
| 16-Jun-2022 |
twosee |
Use get_active_function_or_method_name() for zend_forbid_dynamic_call() (#8762) A slight imperfection in https://github.com/php/php-src/pull/7443. As a zend_API, we should also consider
Use get_active_function_or_method_name() for zend_forbid_dynamic_call() (#8762) A slight imperfection in https://github.com/php/php-src/pull/7443. As a zend_API, we should also consider other extensions that may call it in methods. This change will not break the behavior of php-src.
show more ...
|
#
b40ae808 |
| 07-Jun-2022 |
George Peter Banyard |
Convert iterable into an internal alias for Traversable|array (#7309) This does a compile time transformation of ``iterable`` into ``Traversable|array`` which simplifies some of the LSP vari
Convert iterable into an internal alias for Traversable|array (#7309) This does a compile time transformation of ``iterable`` into ``Traversable|array`` which simplifies some of the LSP variance handling. The arginfo generation script from stubs is updated to produce a union type when it encounters the type ``iterable`` Extension functions which do not regenerate the arginfo, or write them manually are still supported by mimicking the compile time transformation while registering the function. Type Reflection is preserved for single ``iterable`` (and ``?iterable``) to produce a ReflectionNamedType with name ``iterable``, however usage of ``iterable`` in union types will be converted to ``array|Traversable``
show more ...
|
#
7c28196a |
| 01-Jun-2022 |
Sara Golemon |
Partial revert of 6d96f39a68bb
|
#
6d96f39a |
| 01-Jun-2022 |
Máté Kocsis |
Get rid of invalid assertion and cleanup zend_call_method Closes GH-8672
|
#
01d84545 |
| 31-May-2022 |
Sara Golemon |
Verify internal types before abandoning call frame An internal caller executing a builtin method with a static return type will lose context if we drop our frame before performing th
Verify internal types before abandoning call frame An internal caller executing a builtin method with a static return type will lose context if we drop our frame before performing the validation.
show more ...
|
#
d62d50b8 |
| 08-May-2022 |
Ilija Tovilo |
Add C API for getting backed enum case by value Closes GH-8518
|
#
93fc88e8 |
| 25-May-2022 |
Ilija Tovilo |
Fix Enum::from/tryFrom memory leak in JIT for internal enums when passing an int to a string enum. Previously, the int was coerced to a string. The JIT skips parameter clean up when unne
Fix Enum::from/tryFrom memory leak in JIT for internal enums when passing an int to a string enum. Previously, the int was coerced to a string. The JIT skips parameter clean up when unnecessary. In this particular case, passing int to from(int|string) normally doesn't cause a coercion so no dtor for the $value zval is generated. To circumvent this we avoid coersion by explicitly allowing ints and converting them to strings ourselves. Then we can free it appropriately. See GH-8518 Closes GH-8633
show more ...
|
#
74924ada |
| 03-May-2022 |
vajexal <72415539+vajexal@users.noreply.github.com> |
Fix get_function_or_method_name when included file is scoped (#8467)
|
#
070012d6 |
| 09-Feb-2022 |
Tim Düsterhus |
Add tests for function parameter attributes to ext/zend_test These tests verify the correct workings of the previous fixes: - Parameter attributes for native functions should not le
Add tests for function parameter attributes to ext/zend_test These tests verify the correct workings of the previous fixes: - Parameter attributes for native functions should not leak memory. - Parameter attributes for native functions should behave as expected.
show more ...
|
#
68ca3879 |
| 15-Nov-2021 |
Nikita Popov |
Fix generation of property with class union type The generated type was missing the UNION bit. Add a ZEND_TYPE_INIT_UNION macro to hide the implementation details.
|
#
86379b67 |
| 09-Nov-2021 |
Nikita Popov |
Warn if return type on internal __toString() is missing
|
#
a551b083 |
| 09-Nov-2021 |
Nikita Popov |
Add string return type to __toString() of internal classes Same as with userland classes, automatically add a string return type to __toString() methods in internal classes, so the signa
Add string return type to __toString() of internal classes Same as with userland classes, automatically add a string return type to __toString() methods in internal classes, so the signature is compatible with Stringable.
show more ...
|
#
471102ed |
| 21-Oct-2021 |
Bob Weinand |
Add ZEND_API for weakmap functionality via zend_weakrefs_hash_add/del Closes GH-7600.
|
#
e489e2d3 |
| 11-Oct-2021 |
Nikita Popov |
Add missing $flags param to getStream() This is an alias of getStreamName() but was missing the optional $flags parameter.
|
#
5bda4cd2 |
| 04-Sep-2021 |
codinghuang |
Support specifying start position in compile_string Add additional zend_compile_position argument, which can be either AT_SHEBANG, AT_OPEN_TAG or AFTER_OPEN_TAG. The previous behavior
Support specifying start position in compile_string Add additional zend_compile_position argument, which can be either AT_SHEBANG, AT_OPEN_TAG or AFTER_OPEN_TAG. The previous behavior corresponds to AFTER_OPEN_TAG. Closes GH-7462.
show more ...
|
#
4483ecf5 |
| 02-Sep-2021 |
Máté Kocsis |
Properly escape the default value of string properties and enum cases
|
#
32d48212 |
| 31-Aug-2021 |
Nikita Popov |
Support generating internal enum decl from stubs
|
#
eaac77f4 |
| 31-Aug-2021 |
Go Kudo |
Fix nested namespaced typed property in gen_stub.php (#7418) Property escape namespaced class name in property types.
|
#
a374230c |
| 22-Jul-2021 |
Nikita Popov |
Add support for internal enums This adds support for internal enums with the same basic approach as userland enums. Enum values are stored as CONSTANT_AST and objects created during
Add support for internal enums This adds support for internal enums with the same basic approach as userland enums. Enum values are stored as CONSTANT_AST and objects created during constant updating at runtime. This means that we need to use mutable_data for internal enums. This just adds basic support and APIs, it does not include the stubs integration from #7212. Closes GH-7302.
show more ...
|
#
fc56de11 |
| 22-Jul-2021 |
Máté Kocsis |
Add support for generating readonly properties via stubs (#7297)
|
#
b3828836 |
| 20-Jul-2021 |
Máté Kocsis |
Indent stubs inside global namespace blocks (#7261)
|
#
fcd18757 |
| 10-May-2021 |
Máté Kocsis |
Add reproducer for possible issue with object return type inheritance (#6961) Fix early inheritance Co-authored-by: Joe Watkins <krakjoe@php.net>
|
#
803779e8 |
| 16-Feb-2021 |
Máté Kocsis |
Add support for generating properties with union type of multiple classes Closes GH-6701
|