Commit 8b596a28abe for php.net

commit 8b596a28abe8f2906af718ee358f2032dcd65edd
Merge: 415a415381b dc875173c27
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date:   Fri Jul 31 15:55:43 2026 -0400

    Merge branch 'PHP-8.5'

    * PHP-8.5:
      Resolve the effective property in ReflectionProperty lazy APIs

    master takes the property info and scope directly in
    reflection_property_get_effective_prop() and
    reflection_property_check_lazy_compatible(), so both call sites are
    adapted to those signatures here.

diff --cc ext/reflection/php_reflection.c
index 25eb592e761,9780a0368cf..58636c08539
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@@ -6161,8 -6309,17 +6155,17 @@@ ZEND_METHOD(ReflectionProperty, skipLaz
  		object = zend_lazy_object_get_instance(object);
  	}

- 	const zval *src = &object->ce->default_properties_table[OBJ_PROP_TO_NUM(ref->prop->offset)];
- 	zval *dst = OBJ_PROP(object, ref->prop->offset);
 -	zend_property_info *prop = reflection_property_get_effective_prop(ref,
 -			intern->ce, object);
++	const zend_property_info *prop = reflection_property_get_effective_prop(ref->prop,
++			ref->unmangled_name, intern->ce, object);
+
+ 	if (reflection_property_check_lazy_compatible(prop,
 -				ref->unmangled_name, intern, object,
++				ref->unmangled_name, intern->ce, object,
+ 				"skipLazyInitialization") == FAILURE) {
+ 		RETURN_THROWS();
+ 	}
+
 -	zval *src = &object->ce->default_properties_table[OBJ_PROP_TO_NUM(prop->offset)];
++	const zval *src = &object->ce->default_properties_table[OBJ_PROP_TO_NUM(prop->offset)];
+ 	zval *dst = OBJ_PROP(object, prop->offset);

  	if (!(Z_PROP_FLAG_P(dst) & IS_PROP_LAZY)) {
  		/* skipLazyInitialization has no effect on non-lazy properties */
@@@ -6203,7 -6356,14 +6202,14 @@@ ZEND_METHOD(ReflectionProperty, isLazy
  		object = zend_lazy_object_get_instance(object);
  	}

- 	RETURN_BOOL(Z_PROP_FLAG_P(OBJ_PROP(object, ref->prop->offset)) & IS_PROP_LAZY);
 -	const zend_property_info *prop = reflection_property_get_effective_prop(ref,
 -			intern->ce, object);
++	const zend_property_info *prop = reflection_property_get_effective_prop(ref->prop,
++			ref->unmangled_name, intern->ce, object);
+
+ 	if (!prop || prop->flags & (ZEND_ACC_STATIC | ZEND_ACC_VIRTUAL)) {
+ 		RETURN_FALSE;
+ 	}
+
+ 	RETURN_BOOL(Z_PROP_FLAG_P(OBJ_PROP(object, prop->offset)) & IS_PROP_LAZY);
  }

  /* {{{ Returns true if property was initialized */