History log of /php-src/Zend/zend_inheritance.c (Results 76 – 100 of 435)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 663536d7 27-Jul-2021 Máté Kocsis

Improve class inheritance error messages (#7307)

# 3eb97a45 22-Jul-2021 Nikita Popov

Always use separate static_members_table

When running without opcache, static_members_table is shared with
default_static_members_table. This is visible in reflection output,
because

Always use separate static_members_table

When running without opcache, static_members_table is shared with
default_static_members_table. This is visible in reflection output,
because ReflectionProperty::getDefaultValue() will return the
current value, rather than the default value.

Address this by never sharing the table, which matches the behavior
we already see under opcache.

Fixes bug #80821.

Closes GH-7299.

show more ...

# ae8647d9 20-Jul-2021 Levi Morrison

Remove leading underscore for _zend_hash_find_known_hash (#7260)

Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...)
Convert zend_hash_find_ex(..., 0) to zend_hash_find(.

Remove leading underscore for _zend_hash_find_known_hash (#7260)

Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...)
Convert zend_hash_find_ex(..., 0) to zend_hash_find(...)

Also add serializable changes to UPGRADING.INTERNALS summary

show more ...

Revision tags: php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1
# 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 ...

# 814a9327 16-Jul-2021 Nikita Popov

Add ZEND_ACC_NOT_SERIALIZABLE flag

This prevents serialization and unserialization of a class and its
children in a way that does not depend on the zend_class_serialize_deny
and zend

Add ZEND_ACC_NOT_SERIALIZABLE flag

This prevents serialization and unserialization of a class and its
children in a way that does not depend on the zend_class_serialize_deny
and zend_class_unserialize_deny handlers that will be going away
in PHP 9 together with the Serializable interface.

In stubs, `@not-serializable` can be used to set this flag.

This patch only uses the new flag for a handful of Zend classes,
converting the remainder is left for later.

Closes GH-7249.
Fixes bug #81111.

show more ...

# a837d353 19-Jul-2021 Nikita Popov

Don't track internal class dependencies

Subtyping relationships established on internal classes are always
going to hold (if we ignore Windows), so there is no need to
explicitly tra

Don't track internal class dependencies

Subtyping relationships established on internal classes are always
going to hold (if we ignore Windows), so there is no need to
explicitly track them.

This fixes an assertion failure in GH-7251.

show more ...

# 1bc5bd7f 15-Jul-2021 Nikita Popov

Handle both WARNING and UNRESOLVED during early binding

We would previously early exit on the WARNING, and miss the
later UNRESOLVED.

# a5360e80 06-Jul-2021 Máté Kocsis

Add support for final class constants

RFC: https://wiki.php.net/rfc/final_class_const

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

# 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 ...

# ac99d5b5 01-Jul-2021 Nikita Popov

Simplify registration of unresolved classes

If we have an UNRESOLVED result, simply register all classes that
occur in either of the types. I believe that's equivalent to what
we're

Simplify registration of unresolved classes

If we have an UNRESOLVED result, simply register all classes that
occur in either of the types. I believe that's equivalent to what
we're currently doing in a more complicated way.

show more ...

# f256c3f6 30-Jun-2021 Nikita Popov

Move INHERITANCE_WARNING handling one layer up

There is only a single place where we need to convert ERROR into
WARNING, don't thread it through more places than necessary.

# 773e9ba5 28-Jun-2021 Máté Kocsis

Mention ReturnTypeWillChange attribute in the error message (#7183)

# ceb6fa6d 18-Jun-2021 Patrick Allaert

Convert some recently introduced zend_bool to bool

As well as `scripts/dev/check_parameters.php` utility.

Cfr. 3e01f5afb1b52fe26a956190296de0192eedeec1

Revision tags: php-8.0.7, php-7.4.20
# 100a1e8e 28-May-2021 Nikita Popov

Convert exception during inheritance to fatal error

Now that inheritance can throw deprecations again, these may be
converted to exception by a custom error handler. In this case
we

Convert exception during inheritance to fatal error

Now that inheritance can throw deprecations again, these may be
converted to exception by a custom error handler. In this case
we need to convert the exception to a fatal error, as inheritance
cannot safely throw in the general case.

show more ...

Revision tags: php-8.0.7RC1, php-7.4.20RC1
# f0858d89 17-May-2021 Nikita Popov

Record warnings during early binding

These should also get replayed when the class is loaded from
opcache.

# 3b7edb65 17-May-2021 Nikita Popov

Don't directly throw warning during method compatibility check

Only return the INHERITANCE_WARNING status.

# 532c60cb 06-May-2021 Máté Kocsis

Add support for tentative return types of internal methods

RFC: https://wiki.php.net/rfc/internal_method_return_types

Closses GH-6971

# c40231af 12-May-2021 George Peter Banyard

Mark various functions with void arguments.

This fixes a bunch of [-Wstrict-prototypes] warning,
because in C func() and func(void) have different semantics.

# 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>

# f71bfe45 10-May-2021 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
Don't autoload classes during covariant type check against mixed


# 7fbfcfa8 10-May-2021 Nikita Popov

Don't autoload classes during covariant type check against mixed

mixed should be behaving the same way as no type here, and not
require X to be autoloaded. Everything apart from "void" i

Don't autoload classes during covariant type check against mixed

mixed should be behaving the same way as no type here, and not
require X to be autoloaded. Everything apart from "void" is trivially
covariant to "mixed".

show more ...

Revision tags: php-8.0.6, php-7.4.19
# 79071d5e 29-Apr-2021 Nikita Popov

Don't duplicate internal prop info (#6929)

Userland property infos are no longer duplicated since PHP 7.4, when we
stopped setting SHADOW flags on inherited private properties. Stop dupl

Don't duplicate internal prop info (#6929)

Userland property infos are no longer duplicated since PHP 7.4, when we
stopped setting SHADOW flags on inherited private properties. Stop duplicating
internal property infos as well.

This requires switching class destruction to work in reverse order, as child
classes may be reusing structures from parent classes, and as such should be
destroyed first.

show more ...

# dd86987b 29-Apr-2021 Nikita Popov

Replay warnings during inheritance (#6928)

Since 3e6b447979a2b1f351faf40bee9c6cf7e362d85a it is again possible to have
warnings (deprecations) during inheritance, and more such functiona

Replay warnings during inheritance (#6928)

Since 3e6b447979a2b1f351faf40bee9c6cf7e362d85a it is again possible to have
warnings (deprecations) during inheritance, and more such functionality is
likely in the future. This is a problem, because such warnings will only be
shown on the first request if the opcache inheritance cache is used. This
currently causes test failures in --repeat builds.

Fix this by uplifting the error recording functionality from opcache to Zend,
and then using it to persist a warning trace in the inheritance cache, which
can then be used to replay the warnings on subsequent executions.

show more ...

Revision tags: php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16
# 9a1da9f6 22-Feb-2021 Nikita Popov

Don't use separate static variables in inherited methods

RFC: https://wiki.php.net/rfc/static_variable_inheritance

Closes GH-6719.

# fd1d5ec2 28-Apr-2021 Nikita Popov

Add ZEND_CLASS_CONST_FLAGS() macro

And drop Z_ACCESS_FLAGS(). We no longer store *only* access flags
in these.

12345678910>>...18