History log of /PHP-7.4/Zend/zend_inheritance.c (Results 1 – 25 of 205)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 3b7c8bb9 06-Oct-2020 Nikita Popov

Fix bug #80126

When performing an unlinked instanceof, we also need to consider
interfaces of parent classes, as they may not have been inherited
yet.


# 21a9ad91 04-May-2020 Nikita Popov

Fixed bug #79548

When duplicating user functions with static variables, make sure
that we init a new map ptr slot for the static variables.


# 68596ed7 30-Jan-2020 Nikita Popov

Fix copying of functions in variance obligations

Only copy sizeof(zend_internal_function) for internal functions.


# 1146bdb9 28-Jan-2020 Nikita Popov

Fixed bug #78989

Always operate on copies of the functions, so we don't reference
temporary trait methods that have gone out of scope.

This could be more efficient, but doing an

Fixed bug #78989

Always operate on copies of the functions, so we don't reference
temporary trait methods that have gone out of scope.

This could be more efficient, but doing an allocated copy only when
strictly necessary turned out to be somewhat tricky.

show more ...


# 4a61d842 18-Dec-2019 Nikita Popov

Fixed bug #78776

By using the normal inheritance check if the parent is abstract
as well.


# 5fcc12f5 09-Dec-2019 Nikita Popov

Use unmangled named in property type inheritance error


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
# 6d4965fe 06-Nov-2019 Nikita Popov

Fixed bug #78787

Not the first time inheritance of shadow properties causes an issue,
thankfully this whole concept is gone in PHP 7.4.


Revision tags: php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5
# f1848a4b 24-Oct-2019 Nikita Popov

Fix bug #78226: Don't call __set() on uninitialized typed properties

Assigning to an uninitialized typed property will no longer trigger
a call to __set(). However, calls to __set() are

Fix bug #78226: Don't call __set() on uninitialized typed properties

Assigning to an uninitialized typed property will no longer trigger
a call to __set(). However, calls to __set() are still triggered if
the property is explicitly unset().

This gives us both the behavior people generally expect, and still
allows ORMs to do lazy initialization by unsetting properties.

For PHP 8, we should fine a way to forbid unsetting of declared
properties entirely, and provide a different way to achieve lazy
initialization.

show more ...


# 184ba0c9 24-Oct-2019 Nikita Popov

Remove recursive check from instanceof_interface

Parent interfaces are copied into the interface list during
inheritance, so there's no need to perform a recursive check.

Only e

Remove recursive check from instanceof_interface

Parent interfaces are copied into the interface list during
inheritance, so there's no need to perform a recursive check.

Only exception are instanceof checks performed during inheritance
itself. However, we already have unlinked_instanceof for this
purpose, it just needs to be taught to handle this case.

Closes GH-4857.

show more ...


Revision tags: php-7.1.33, php-7.2.24, php-7.3.11
# cf85eb24 17-Oct-2019 Nikita Popov

Integrate property types with variance system

Property types are invariant, but may still have to load classes in
order to check for class aliases. This class loading should follow
t

Integrate property types with variance system

Property types are invariant, but may still have to load classes in
order to check for class aliases. This class loading should follow
the same rules as all other variance checks, rather than just
loading unconditionally.

This change integrates property type invariance checks into the
variance system as a new obligation type, and prevent early binding
if the type check cannot be performed.

show more ...


Revision tags: php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1
# f2e88512 01-Oct-2019 Nikita Popov

Remove func copy optimization for private method with static vars

Not NULLing the static_variables pointer for shadow methods during
static var shutdown would be a way to avoid this leak

Remove func copy optimization for private method with static vars

Not NULLing the static_variables pointer for shadow methods during
static var shutdown would be a way to avoid this leak, but unless
there's evidence that inherited private methods with static vars are
actually a common use-case, I don't think we should keep this kind
of fragile edge-case optimization.

Fixes OSS-Fuzz #17875.

show more ...


Revision tags: php-7.4.0RC3, php-7.2.23, php-7.3.10, php-7.4.0RC2
# 4b9ebd83 11-Sep-2019 Nikita Popov

Allow throwing exception while loading parent class

This is a fix for symfony/symfony#32995.

The behavior is:

* Throwing exception when loading parent/interface is allowed

Allow throwing exception while loading parent class

This is a fix for symfony/symfony#32995.

The behavior is:

* Throwing exception when loading parent/interface is allowed
(and we will also throw one if the class is simply not found).
* If this happens, the bucket key for the class is reset, so
it's possibly to try registering the same class again.
* However, if the class has already been used due to a variance
obligation, the exception is upgraded to a fatal error, as we
cannot safely unregister the class stub anymore.

show more ...


# fbe287a6 11-Sep-2019 Nikita Popov

Fix typo in unlinked_instanceof assertion


# 270e5e3c 11-Sep-2019 Nikita Popov

Only allow "nearly linked" classes for parent/interface

The requirements for parent/interface are difference than for the
variance checks in type declarations. The latter can work on ful

Only allow "nearly linked" classes for parent/interface

The requirements for parent/interface are difference than for the
variance checks in type declarations. The latter can work on fully
unlinked classes, but the former need inheritance to be essentially
finished, only variance checks may still be outstanding.

Adding a new flag for this because we have lots of space, but we
could also represent these "inheritance states" more compactly in
the future.

show more ...


Revision tags: php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1
# 6cc53981 29-Aug-2019 Nikita Popov

Addref static vars when not copying private method

While we don't need to give this method separate static vars, we
do still need to perform an addref, as there will be a corresponding

Addref static vars when not copying private method

While we don't need to give this method separate static vars, we
do still need to perform an addref, as there will be a corresponding
delref in the dtor.

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, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20
# e7446c1b 27-Jun-2019 Dmitry Stogov

Separate common code abd eliminate useless checks


# a58964be 27-Jun-2019 Dmitry Stogov

Inline hot path


# 83b99527 26-Jun-2019 Dmitry Stogov

Avoid double checks on early binding


# 36b7021e 26-Jun-2019 Dmitry Stogov

Private methods don't have to be duplicated


# f7faa62c 25-Jun-2019 Dmitry Stogov

Reorder conditions to minimize number of checks on fast path


# 6288fc19 25-Jun-2019 Dmitry Stogov

Remove always true/false conditions, remove dead conde and simplify code.


# 215b5a7d 25-Jun-2019 Dmitry Stogov

Replace previosly checked conditions by ZEND_ASSERT()


# f09d41ff 25-Jun-2019 Dmitry Stogov

Fixed variance check for abstract constructor during erlay binding


# ccbc121c 25-Jun-2019 Dmitry Stogov

Cleanup


# bd0cb99d 25-Jun-2019 Dmitry Stogov

Prevent useless hash lookups


123456789