History log of /PHP-8.4/Zend/zend_compile.c (Results 176 – 200 of 2585)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
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 ...


# 9e1c9611 17-Jul-2021 George Peter Banyard

Fix intersection types being nullable via implicit forced nullability


# 3cfcfacd 16-Jul-2021 George Peter Banyard

Fix bug pointed out in feature request 81268

The error message which is generated when one tries to assign null to an intersection type property is wrong and misleading


Revision tags: php-8.0.7, php-7.4.20
# d0b09a7b 20-May-2021 Joe Watkins

Add first-class callables

Support acquiring a Closure to a callable using the syntax
func(...), $obj->method(...), etc. This is essentially a
shortcut for Closure::fromCallable().

Add first-class callables

Support acquiring a Closure to a callable using the syntax
func(...), $obj->method(...), etc. This is essentially a
shortcut for Closure::fromCallable().

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

Closes GH-7019.

Co-Authored-By: Nikita Popov <nikita.ppv@gmail.com>

show more ...


# 52d3d0d8 15-Jun-2021 Nikita Popov

Add limited support for new in initializers

Add support for new expressions inside parameter default values,
static variable initializers, global constant initializers and
attribute

Add limited support for new in initializers

Add support for new expressions inside parameter default values,
static variable initializers, global constant initializers and
attribute arguments.

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

Closes GH-7153.

show more ...


# f0b190c3 08-Jul-2021 Nikita Popov

Deprecate return by ref from void function

Part of https://wiki.php.net/rfc/deprecations_php_8_1.


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


# 36f5d719 01-Jul-2021 Nikita Popov

Fix leak on foreach by ref assign to property

In this case we ended up creating an ASSIGN_OBJ_REF with VAR
result operand, which was not freed.

Fix this by implementing assign_r

Fix leak on foreach by ref assign to property

In this case we ended up creating an ASSIGN_OBJ_REF with VAR
result operand, which was not freed.

Fix this by implementing assign_ref_znode the same was as
assign_znode, i.e. performing an assignment with result and
then freeing the result, which will result mark the result as
UNUSED. This is more robust than the special handling for
result == NULL that was used before.

This fixes one of the issues reported in bug #81190.

show more ...


# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs


Revision tags: php-8.0.7RC1, php-7.4.20RC1
# 1c08f8a4 18-May-2021 Nikita Popov

Allow named args after unpack

Currently, argument unpacking and named arguments cannot be mixed
at all. This relaxes the restriction to allow
foo(...$args, named: $arg). The variant

Allow named args after unpack

Currently, argument unpacking and named arguments cannot be mixed
at all. This relaxes the restriction to allow
foo(...$args, named: $arg). The variant foo(named: $arg, ...$args)
is still forbidden, because we can't ensure that positional
parameters come before named parameters in that case (without more
intrusive changes). Effectively this just enforces a required style,
as the order of unpack and named args doesn't matter for the cases
where both could be well-defined.

ML discussion: https://externals.io/message/114589

Closes GH-7009.

show more ...


# a706d730 01-Jun-2021 Ayesh Karunaratne

Improve interface non-public method error message

Currently interface methods with visibility `private` or `protected` fail
with an error message:

Access type for interface me

Improve interface non-public method error message

Currently interface methods with visibility `private` or `protected` fail
with an error message:

Access type for interface method A::b() must be omitted

However, explicitly setting visibility `public` is allowed and often desired.
This commit updates the error message to:

Access type for interface method A::b() must be public

show more ...


# b6958bb8 31-May-2021 George Peter Banyard

Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)

RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

Co-authored-by: Nikita Popov <

Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)

RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

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

show more ...


# 20fc4fa8 29-May-2021 Anatol Belski

Zend: Cleanup dead assignment in zend_compile_class_const

Signed-off-by: Anatol Belski <ab@php.net>


# ba9c0b38 27-May-2021 Nikita Popov

Export zend_unary_op_produces_error() and use in optimizer

Don't repeat this logic, as it's going to become more complex.


# b227a722 21-May-2021 Joe Watkins

ReflectionFunctionAbstract::getClosureUsedVariables

Make a distinction at compile time between bind types for static
variables

getStaticVariables remains unchanged

ReflectionFunctionAbstract::getClosureUsedVariables

Make a distinction at compile time between bind types for static
variables

getStaticVariables remains unchanged

Fixes #80071

show more ...


# c939bd2f 18-May-2021 Nikita Popov

Handle explicitly nullable types in optional-before-required deprecation

The exception for null default values here exists to keep compatibility
with PHP < 7.1 where "Foo $bar = null" wa

Handle explicitly nullable types in optional-before-required deprecation

The exception for null default values here exists to keep compatibility
with PHP < 7.1 where "Foo $bar = null" was the canonical way to create
a nullable parameter. If the parameter is actually "?Foo $bar = null",
then clearly compatibility with PHP < 7.1 is not a concern, and we
can throw a deprecation notice.

show more ...


# afc4d67c 18-May-2021 Nikita Popov

Consistently treat optional-before-required as required

There was a loophole here when it came to usage with named arguments,
which was not intended. Close the loophole thoroughly by act

Consistently treat optional-before-required as required

There was a loophole here when it came to usage with named arguments,
which was not intended. Close the loophole thoroughly by actually
dropping the default value from the signature entirely. The default
is still used to make the type nullable, but not for anything else.

show more ...


# d60bc0e2 14-May-2021 Tyson Andre

Support doc comments on enum cases (#6984)

Because php supports doc comments on class constants, I believe it would also
make sense to support them on enum cases.

I don't have s

Support doc comments on enum cases (#6984)

Because php supports doc comments on class constants, I believe it would also
make sense to support them on enum cases.

I don't have strong opinions about whether attributes should be moved to be the
last element or whether the doc comment should go after the attribute,
but the ast will likely change again before php 8.1 is stable.
So far, all attributes are the last ast child node.

I didn't notice that doc comments weren't implemented due to
https://github.com/php/php-src/pull/6489 being a large change.

https://wiki.php.net/rfc/enumerations
did not mention whether or not doc comments were meant to be supported

show more ...


# 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


# aca6aefd 14-May-2021 George Peter Banyard

Remove 'register' type qualifier (#6980)

The compiler should be smart enough to optimize this on its own


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


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


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