php-src/Zend/tests/readonly_classes
Máté Kocsis adb45a63c0
Fix GH-9186 @strict-properties can be bypassed using unserialization (#9354)
* Emit deprecation warnings when adding dynamic properties to classes during unserialization - this will become an Error in php 9.0.
  (Adding dynamic properties in other contexts was already a deprecation warning - the use case of unserialization was overlooked)
* Throw an error when attempting to add a dynamic property to a `readonly` class when unserializing
* Add new serialization methods `__serialize`/`__unserialize` for SplFixedArray to avoid creating deprecated dynamic
  properties that would then be added to the backing fixed-size array
* Don't add named dynamic/declared properties (e.g. $obj->foo) of SplFixedArray to the backing array when unserializing
* Update tests to declare properties or to expect the deprecation warning
* Add news entry

Co-authored-by: Tyson Andre <tysonandre775@hotmail.com>
2022-08-30 07:46:32 -04:00
..
gh9285_error.phpt Fix GH-9285 Traits cannot be used in readonly classes 2022-08-21 10:33:08 +02:00
gh9285_success.phpt Fix GH-9285 Traits cannot be used in readonly classes 2022-08-21 10:33:08 +02:00
readonly_class_duplicated_modifier.phpt
readonly_class_dynamic_property_attribute.phpt
readonly_class_dynamic_property.phpt
readonly_class_final_modifier.phpt
readonly_class_inheritance_error1.phpt
readonly_class_inheritance_error2.phpt
readonly_class_inheritance_success.phpt
readonly_class_missing_type1.phpt
readonly_class_missing_type2.phpt
readonly_class_property1.phpt
readonly_class_property2.phpt
readonly_class_property3.phpt
readonly_class_unserialize_error.phpt Fix GH-9186 @strict-properties can be bypassed using unserialization (#9354) 2022-08-30 07:46:32 -04:00
readonly_enum.phpt
readonly_interface.phpt
readonly_trait.phpt