History log of /PHP-8.3/ext/reflection/php_reflection.c (Results 176 – 200 of 949)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 9099dbd9 01-Jan-2020 Máté Kocsis

Use RETURN_THROWS() after zend_type_error()


# 81760591 31-Dec-2019 Máté Kocsis

Use RETURN_THROWS() during ZPP in the remaining extensions

In reflection, sodium, and SPL


Revision tags: php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1
# 42a2fb84 09-Dec-2019 Dmitry Stogov

Fixed bug #78895 (Reflection detects abstract non-static class as abstract static. IS_IMPLICIT_ABSTRACT is not longer used)


Revision tags: php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3
# 999e32b6 25-Sep-2019 Nikita Popov

Implement union types

According to RFC: https://wiki.php.net/rfc/union_types_v2

The type representation now makes use of both the pointer payload
and the type mask at the same t

Implement union types

According to RFC: https://wiki.php.net/rfc/union_types_v2

The type representation now makes use of both the pointer payload
and the type mask at the same time. Additionall, zend_type_list is
introduced as a new kind of pointer payload, which is used to store
multiple class types. Each of the class types is a tagged pointer,
which may be either a class name or class entry. The latter is only
used for typed properties, while arguments/returns will instead use
cache slots. A type list can contain a mix of both names and CEs at
the same time, as not all classes may be resolvable.

One thing this is missing is support for union types in arginfo
and stubs, which I want to handle separately.

I've also dropped the special object code from the JIT implementation
for now -- I plan to add this back in a different form at a later time.
For now I did not want to include non-trivial JIT changes together
with large functional changes.

Another possible piece of follow-up work is to implement "iterable"
as an internal alias for "array|Traversable". I believe this will
eliminate quite a few special-cases that had to be implemented.

Closes GH-4838.

show more ...


Revision tags: php-7.2.23, php-7.3.10
# ac4e0f08 20-Sep-2019 Nikita Popov

Make zend_type a 2-field struct

We now store the pointer payload and the type mask separately. This
is in preparation for union types, where we will be using both at
the same time.

Make zend_type a 2-field struct

We now store the pointer payload and the type mask separately. This
is in preparation for union types, where we will be using both at
the same time.

To avoid increasing the size of arginfo structures, the
pass_by_reference and is_variadic fields are now stored as part of
the type_mask (8-bit are reserved for custom use).

Different types of pointer payloads are distinguished based on bits
in the type_mask.

show more ...


# 5b447d4b 04-Nov-2019 Nikita Popov

Remove dead code related to inherits props in reflection

Public/protected properties defined in parent classes will be
inherited in the child -- there is no need to explicitly try to

Remove dead code related to inherits props in reflection

Public/protected properties defined in parent classes will be
inherited in the child -- there is no need to explicitly try to
walk up the chain and look them up.

show more ...


# 0e3045ae 04-Nov-2019 Nikita Popov

Store pointer to property_info in reflection

Instead of constructing a dummy property_info for dynamic properties,
leave the field as NULL and handle this as appropriate.

This w

Store pointer to property_info in reflection

Instead of constructing a dummy property_info for dynamic properties,
leave the field as NULL and handle this as appropriate.

This was originally part of an alternative fix for bug #78774, but
I think doing it this way is generally preferrable independently
of that.

show more ...


# c9abfaec 04-Nov-2019 Nikita Popov

Fixed bug #78774

The string held by the zend_type may be released if the property
type gets resolved to a CE. I initially wanted to fix this by
storing a zend_type* instead (so the p

Fixed bug #78774

The string held by the zend_type may be released if the property
type gets resolved to a CE. I initially wanted to fix this by
storing a zend_type* instead (so the property type resolution
propagates to the ReflectionType), but decided against this in
light of upcoming union types support, where we also need to
represent parts of the union, and will not have a single zend_type*
we can reference.

show more ...


# 4008704f 01-Nov-2019 Christoph M. Becker

zend_parse_parameters_throw() is obsolete

Since `zend_parse_parameters()` throws now, there is no reason to
explicitly call `zend_parse_parameters_throw()` anymore, and since both
ha

zend_parse_parameters_throw() is obsolete

Since `zend_parse_parameters()` throws now, there is no reason to
explicitly call `zend_parse_parameters_throw()` anymore, and since both
have actually the same implementation, we redefine the latter as macro.

show more ...


# b897d195 27-Oct-2019 Christoph M. Becker

Add missing zend_parse_parameters_none()

We fix the trivial cases; some others need further discussion, see
<https://news-web.php.net/php.internals/107723>.


# addc78f3 27-Oct-2019 Christoph M. Becker

Revert "Add missing zend_parse_parameters_none()"

This reverts commit ef439ec895a97a12e8f88c3371dfc8881a501649.
Test failures need to be resolved first.


# ef439ec8 27-Oct-2019 Christoph M. Becker

Add missing zend_parse_parameters_none()


# c9fc076a 13-Oct-2019 Thomas Gerbet

Add stubs for ext-reflection


# 530a8a38 21-Oct-2019 Nikita Popov

Fix and undeprecate ReflectionType::__toString()

Add deprecated _ZendTestClass::__toString() method to preserve
an existing test.

ReflectionType::__toString() will now return a

Fix and undeprecate ReflectionType::__toString()

Add deprecated _ZendTestClass::__toString() method to preserve
an existing test.

ReflectionType::__toString() will now return a complete
representation of the type, as it should have originally. Users
that relied on nullability being absent should have been pushed
to ReflectionNamedType::getName() by the deprecation of
ReflectionType::__toString() in PHP 7.1 / PHP 7.4.

show more ...


# bea2ff88 19-Oct-2019 Fabien Villepinte

Fix bug #78697: inaccurate error message


# f085bddb 07-Oct-2019 Nikita Popov

Fix number of required arguments in arginfo

* pack() only requires one argument
* stream_context_set_option() only requires two arguments
* ReflectionMethod::getClosure() accepts no

Fix number of required arguments in arginfo

* pack() only requires one argument
* stream_context_set_option() only requires two arguments
* ReflectionMethod::getClosure() accepts no args for static methods
* DOMDocument::createProcessingInstruction() only requires one arg
* DOMImplementation::createDocument() only requires two arguments
* DOMDocument::importNode() only requires one arg
* mysql_get_client_version() doesn't accept any args,
despite what the docs say...

show more ...


# 5d6e923d 24-Sep-2019 Gabriel Caruso

Remove mention of PHP major version in Copyright headers

Closes GH-4732.


# 0c7124e6 23-Sep-2019 Christoph M. Becker

Add check_only parameter to get_closure handler

`get_closure` handlers are called to check whether an object is
callable, and to actually get the closure, respectively. The behavior

Add check_only parameter to get_closure handler

`get_closure` handlers are called to check whether an object is
callable, and to actually get the closure, respectively. The behavior
of the handler might differ for these two cases, particularly the
handler may throw in the latter case, but should not in the former.

Therefore we add a `check_only` parameter, to be able to distinguish
the desired purpose.

show more ...


# 6276dd82 23-Sep-2019 Nikita Popov

Use ZEND_TYPE_IS_SET() when checking for property types

Instead of a simple if or 0 comparison. This would no longer work
if zend_type is a struct.


# 3012d006 23-Sep-2019 Nikita Popov

Don't set nullability flag for parameters without type

Use value 0 instead. To compensate we check in ReflectionParameter
allowsNull() whether the type is set at all: If it isn't, it alw

Don't set nullability flag for parameters without type

Use value 0 instead. To compensate we check in ReflectionParameter
allowsNull() whether the type is set at all: If it isn't, it always
allows null.

This removes a discrepancy between internal&userland functions:
For userland functions allowsNull() on untyped parameters returned
true, but for internal functions it returned false.

show more ...


# 8d7911ef 20-Sep-2019 Nikita Popov

Standardize type printing in reflection

Use ?T instead of "T or NULL".


# 9e8ba789 19-Sep-2019 Nikita Popov

Change representation of zend_type from type code to MAY_BE_* mask

This switches zend_type from storing a single IS_* type code to
storing a MAY_BE_* type mask. Right now most code still

Change representation of zend_type from type code to MAY_BE_* mask

This switches zend_type from storing a single IS_* type code to
storing a MAY_BE_* type mask. Right now most code still assumes
that there is only a single type in the mask (or two together
with MAY_BE_NULL). But this will make it a lot simpler to introduce
union types.

An additional advantage (and why I'm doing this separately), is
that a number of special cases no longer need to be handled
separately: We can do a single mask & (1 << type) check to handle
all simple types, booleans (true|false) and null.

show more ...


Revision tags: php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1
# 4fc4249d 02-Sep-2019 Nikita Popov

Make ReflectionType an abstract class

This is never instantiated directly, only child classes are used.


# bdf2cd75 02-Sep-2019 Nikita Popov

Move isBuiltin() method from ReflectionType to ReflectionNamedType

This method only makes sense for single types, e.g. it would be
meaningless for union types.

Note that we alwa

Move isBuiltin() method from ReflectionType to ReflectionNamedType

This method only makes sense for single types, e.g. it would be
meaningless for union types.

Note that we always return ReflectionNamedType right now, so this does
not break compatibility for code using any currently existing types.

show more ...


Revision tags: php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1
# d891b5f4 13-Aug-2019 Nikita Popov

Fixed bug #78410


12345678910>>...38