This repository was archived by the owner on Apr 25, 2026. It is now read-only.
Description Hiya,
I just encountered something weird.
I'm parsing this string which has different objects:
a:11:{i:0;O:31:"KPS\Logistics\Status\To\Delayed":5:{s:12:"delay_reason";s:12:"out_of_stock";s:11:"delay_until";O:8:"DateTime":3:{s:4:"date";s:26:"2021-10-28 00:00:00.000000";s:13:"timezone_type";i:1;s:8:"timezone";s:6:"+00:00";}s:4:"from";s:7:"delayed";s:2:"to";s:7:"delayed";s:4:"date";O:8:"DateTime":3:{s:4:"date";s:26:"2021-10-04 07:57:02.880620";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}i:1;O:31:"KPS\Logistics\Status\To\Regular":3:{s:4:"from";s:10:"processing";s:2:"to";s:10:"processing";s:4:"date";O:8:"DateTime":3:{s:4:"date";s:26:"2021-10-28 06:59:16.556841";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}i:2;O:31:"KPS\Logistics\Status\To\Delayed":5:{s:12:"delay_reason";s:12:"out_of_stock";s:11:"delay_until";O:8:"DateTime":3:{s:4:"date";s:26:"2021-11-25 00:00:00.000000";s:13:"timezone_type";i:1;s:8:"timezone";s:6:"+00:00";}s:4:"from";s:7:"delayed";s:2:"to";s:7:"delayed";s:4:"date";O:8:"DateTime":3:{s:4:"date";s:26:"2021-10-28 08:54:25.005632";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}i:3;O:31:"KPS\Logistics\Status\To\Regular":3:{s:4:"from";s:10:"processing";s:2:"to";s:10:"processing";s:4:"date";O:8:"DateTime":3:{s:4:"date";s:26:"2021-10-28 08:54:25.037250";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}i:4;O:31:"KPS\Logistics\Status\To\Delayed":5:{s:12:"delay_reason";s:12:"out_of_stock";s:11:"delay_until";O:8:"DateTime":3:{s:4:"date";s:26:"2021-11-25 00:00:00.000000";s:13:"timezone_type";i:1;s:8:"timezone";s:6:"+00:00";}s:4:"from";s:7:"delayed";s:2:"to";s:7:"delayed";s:4:"date";O:8:"DateTime":3:{s:4:"date";s:26:"2021-10-28 11:25:48.219544";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}i:5;O:31:"KPS\Logistics\Status\To\Regular":3:{s:4:"from";s:10:"processing";s:2:"to";s:10:"processing";s:4:"date";O:8:"DateTime":3:{s:4:"date";s:26:"2021-11-25 07:04:58.147908";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}i:6;O:31:"KPS\Logistics\Status\To\Delayed":5:{s:12:"delay_reason";s:12:"out_of_stock";s:11:"delay_until";O:8:"DateTime":3:{s:4:"date";s:26:"2021-12-24 00:00:00.000000";s:13:"timezone_type";i:1;s:8:"timezone";s:6:"+00:00";}s:4:"from";s:7:"delayed";s:2:"to";s:7:"delayed";s:4:"date";O:8:"DateTime":3:{s:4:"date";s:26:"2021-11-25 13:50:07.229584";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}i:7;O:31:"KPS\Logistics\Status\To\Regular":3:{s:4:"from";s:10:"processing";s:2:"to";s:10:"processing";s:4:"date";O:8:"DateTime":3:{s:4:"date";s:26:"2021-11-25 13:50:07.262880";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}i:8;O:31:"KPS\Logistics\Status\To\Delayed":5:{s:12:"delay_reason";s:12:"out_of_stock";s:11:"delay_until";O:8:"DateTime":3:{s:4:"date";s:26:"2021-12-24 00:00:00.000000";s:13:"timezone_type";i:1;s:8:"timezone";s:6:"+00:00";}s:4:"from";s:7:"delayed";s:2:"to";s:7:"delayed";s:4:"date";O:8:"DateTime":3:{s:4:"date";s:26:"2021-11-25 13:50:16.825377";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}i:9;O:31:"KPS\Logistics\Status\To\Regular":3:{s:4:"from";s:8:"canceled";s:2:"to";s:8:"canceled";s:4:"date";O:8:"DateTime":3:{s:4:"date";s:26:"2021-11-26 09:06:38.775093";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}i:10;O:32:"KPS\Logistics\Status\To\Canceled":4:{s:2:"to";s:8:"canceled";s:13:"cancel_reason";s:6:"refund";s:4:"from";s:8:"canceled";s:4:"date";O:8:"DateTime":3:{s:4:"date";s:26:"2021-11-26 08:06:38.796815";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}}
Details
Array
(
[0] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => KPS\Logistics\Status\To\Delayed
[delay_reason] => out_of_stock
[delay_until] => DateTime Object
(
[date] => 2021-10-28 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[from] => delayed
[to] => delayed
[date] => DateTime Object
(
[date] => 2021-10-04 07:57:02.880620
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
)
[1] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => KPS\Logistics\Status\To\Regular
[from] => processing
[to] => processing
[date] => DateTime Object
(
[date] => 2021-10-28 06:59:16.556841
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
)
[2] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => KPS\Logistics\Status\To\Delayed
[delay_reason] => out_of_stock
[delay_until] => DateTime Object
(
[date] => 2021-11-25 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[from] => delayed
[to] => delayed
[date] => DateTime Object
(
[date] => 2021-10-28 08:54:25.005632
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
)
[3] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => KPS\Logistics\Status\To\Regular
[from] => processing
[to] => processing
[date] => DateTime Object
(
[date] => 2021-10-28 08:54:25.037250
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
)
[4] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => KPS\Logistics\Status\To\Delayed
[delay_reason] => out_of_stock
[delay_until] => DateTime Object
(
[date] => 2021-11-25 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[from] => delayed
[to] => delayed
[date] => DateTime Object
(
[date] => 2021-10-28 11:25:48.219544
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
)
[5] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => KPS\Logistics\Status\To\Regular
[from] => processing
[to] => processing
[date] => DateTime Object
(
[date] => 2021-11-25 07:04:58.147908
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
)
[6] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => KPS\Logistics\Status\To\Delayed
[delay_reason] => out_of_stock
[delay_until] => DateTime Object
(
[date] => 2021-12-24 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[from] => delayed
[to] => delayed
[date] => DateTime Object
(
[date] => 2021-11-25 13:50:07.229584
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
)
[7] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => KPS\Logistics\Status\To\Regular
[from] => processing
[to] => processing
[date] => DateTime Object
(
[date] => 2021-11-25 13:50:07.262880
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
)
[8] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => KPS\Logistics\Status\To\Delayed
[delay_reason] => out_of_stock
[delay_until] => DateTime Object
(
[date] => 2021-12-24 00:00:00.000000
[timezone_type] => 1
[timezone] => +00:00
)
[from] => delayed
[to] => delayed
[date] => DateTime Object
(
[date] => 2021-11-25 13:50:16.825377
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
)
[9] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => KPS\Logistics\Status\To\Regular
[from] => canceled
[to] => canceled
[date] => DateTime Object
(
[date] => 2021-11-26 09:06:38.775093
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
)
[10] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => KPS\Logistics\Status\To\Canceled
[to] => canceled
[cancel_reason] => refund
[from] => canceled
[date] => DateTime Object
(
[date] => 2021-11-26 08:06:38.796815
[timezone_type] => 3
[timezone] => UTC
)
)
)
This is my model:
public class OrderItemStatusLogWpModel : IPhpObject
{
private string ? _className ;
[ PhpProperty ( "cancel_reason" ) ]
public string ? CancelReason { get ; set ; }
[ PhpProperty ( "delay_reason" ) ]
public string ? DelayReason { get ; set ; }
[ PhpProperty ( "delay_until" ) ]
public PhpDateTime ? DelayUntil { get ; set ; }
[ PhpProperty ( "from" ) ]
public string ? From { get ; set ; }
[ PhpProperty ( "to" ) ]
public string ? To { get ; set ; }
[ PhpProperty ( "date" ) ]
public PhpDateTime ? Date { get ; set ; }
#region IPhpObject
public string GetClassName ( ) => _className ?? throw new InvalidOperationException ( $ "{ nameof ( _className ) } was not set yet, call { nameof ( SetClassName ) } first!") ;
public void SetClassName ( string className ) =>
_className = className ;
#endregion
}
Now i remove the CancelReason property, and run the same code:
public class OrderItemStatusLogWpModel : IPhpObject
{
private string ? _className ;
//[PhpProperty("cancel_reason")]
//public string? CancelReason { get; set; }
[ PhpProperty ( "delay_reason" ) ]
public string ? DelayReason { get ; set ; }
[ PhpProperty ( "delay_until" ) ]
public PhpDateTime ? DelayUntil { get ; set ; }
[ PhpProperty ( "from" ) ]
public string ? From { get ; set ; }
[ PhpProperty ( "to" ) ]
public string ? To { get ; set ; }
[ PhpProperty ( "date" ) ]
public PhpDateTime ? Date { get ; set ; }
#region IPhpObject
public string GetClassName ( ) => _className ?? throw new InvalidOperationException ( $ "{ nameof ( _className ) } was not set yet, call { nameof ( SetClassName ) } first!") ;
public void SetClassName ( string className ) =>
_className = className ;
#endregion
}
And now suddenly the Date property is not being set:
It seems to only be the last entry that is having difficulties:
Running v0.10.0
Reactions are currently unavailable
Hiya,
I just encountered something weird.
I'm parsing this string which has different objects:
Details
This is my model:
Now i remove the
CancelReasonproperty, and run the same code:And now suddenly the
Dateproperty is not being set:It seems to only be the last entry that is having difficulties:
Running v0.10.0