You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deepcopy library throws an error when attempting to copy instances of PHP's DatePeriod due to the readonly property DatePeriod::$start. This issue arises because deepcopy tries to modify the $start property of DatePeriod, which is read-only as of PHP 8.2.
Description
The
deepcopy
library throws an error when attempting to copy instances of PHP'sDatePeriod
due to the readonly propertyDatePeriod::$start
. This issue arises becausedeepcopy
tries to modify the$start
property ofDatePeriod
, which is read-only as of PHP 8.2.The error message is:
Proposed Solution
Introduce a custom
DatePeriodFilter
that safely copiesDatePeriod
objects without modifying their readonly properties.Code Example for
DatePeriodFilter
The following filter can be added to handle
DatePeriod
objects indeepcopy
:The text was updated successfully, but these errors were encountered: