Derick Rethans
242b9438ea
Fixed tests that relied on date.timezone=UTC to work
2022-06-10 12:00:25 +01:00
Derick Rethans
63aa5a4b5d
Improve error message, and add additional test.
2022-06-02 09:24:13 +01:00
Derick Rethans
6770158d47
Only warn when an incorrect timezone is set through 'date.timezone'
2022-06-02 09:24:13 +01:00
Derick Rethans
e0d21297fe
Update wording of warning message, and reinstate 'UTC' fallback for ctor
2022-06-02 09:24:13 +01:00
Derick Rethans
b3c6b540a1
Fixed bug #73239 (DateTime shows strange error message with invalid timezone)
2022-06-02 09:24:13 +01:00
Máté Kocsis
21fe72757c
Declare DatePeriod properties ( #8534 )
2022-05-28 08:43:10 +02:00
Derick Rethans
1400aa4fb5
Merge branch 'PHP-8.1'
2022-05-27 14:44:41 +01:00
Derick Rethans
f3d23d45c0
Merge branch 'PHP-8.0' into PHP-8.1
2022-05-27 14:44:06 +01:00
Derick Rethans
d5e57268a9
Fixed bug #78139 (timezone_open accepts invalid timezone string argument).
2022-05-27 14:43:04 +01:00
Derick Rethans
e59bb88b7f
Merge branch 'PHP-8.1'
2022-05-27 14:29:03 +01:00
Derick Rethans
4f32983fbe
Merge branch 'PHP-8.0' into PHP-8.1
2022-05-27 14:27:29 +01:00
Derick Rethans
6418eba1cd
Fixed bug #74671 (DST timezone abbreviation has incorrect offset)
2022-05-27 09:33:20 +01:00
Matteo Beccati
344555768a
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed test
2022-05-27 08:37:40 +02:00
Matteo Beccati
6d4ebe7e0f
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed test
2022-05-27 08:37:21 +02:00
Matteo Beccati
b90201745f
Fixed test
2022-05-27 08:36:56 +02:00
Derick Rethans
f3441c832f
Merge branch 'PHP-8.1'
2022-05-26 15:19:34 +01:00
Derick Rethans
a04eccb294
Merge branch 'PHP-8.0' into PHP-8.1
2022-05-26 15:19:27 +01:00
Derick Rethans
209ea3ffc7
Fixed tests
2022-05-26 14:30:22 +01:00
Derick Rethans
2dcd82162e
Fixed bug #72963 (Null-byte injection in CreateFromFormat and related functions)
2022-05-26 13:49:51 +01:00
Derick Rethans
dfd1d7a531
Fixed bug #76963 (Null-byte injection in createFromFormat)
2022-05-26 13:49:51 +01:00
George Peter Banyard
862ef7a332
Fix test expectation for date bug 81565
2022-05-20 14:29:46 +01:00
Derick Rethans
7fedb43f15
Merge branch 'PHP-8.1'
2022-05-20 13:25:43 +01:00
Derick Rethans
008016b536
Fixed bug #81565 (date parsing fails when provided with timezones including seconds)
2022-05-20 13:18:43 +01:00
Derick Rethans
78d5076b25
Fixed bug #51987 (Datetime fails to parse an ISO 8601 ordinal date (extended format))
2022-05-20 13:18:43 +01:00
Derick Rethans
23dbefdb7b
Fixed bug #51934 (strtotime plurals / incorrect time)
2022-05-20 13:18:43 +01:00
Derick Rethans
20d8c1bea5
Fixed bug #68549 (Timezones and offsets are not properly used when working with dates)
2022-05-20 13:18:43 +01:00
Derick Rethans
ee2776210b
Fixed bug #66019 (DateTime object does not support short ISO 8601 time format - YYYY-MM-DDTHH)
2022-05-20 13:18:43 +01:00
Derick Rethans
ef55bf7149
Fixed bug GH-7758 (Problems with negative timestamps and fractions)
2022-05-20 13:18:42 +01:00
Derick Rethans
b510868bb8
Adjust existing tests for fixed bugs
2022-05-20 13:18:26 +01:00
Derick Rethans
1af354a659
Add extra test case that hase both EXCLUDE_START_DATE and INCLUDE_END_DATE
2022-05-20 11:17:19 +01:00
Derick Rethans
4f1b8f4828
Add serialisation support for the new 'include_end_date' property
2022-05-20 11:17:19 +01:00
Derick Rethans
c0c801d238
Fixed bug #52015 (Allow including end date in DatePeriod iterations)
2022-05-20 11:17:19 +01:00
Derick Rethans
1eab5b7970
GH-8458: DateInterval::createFromDateString does not throw non-relative items are present
2022-05-11 13:52:12 +01:00
Derick Rethans
5164f60c88
Merge branch 'PHP-8.1'
2022-05-05 15:24:14 +01:00
Derick Rethans
7670ee4342
Merge branch 'PHP-8.0' into PHP-8.1
2022-05-05 15:24:10 +01:00
Derick Rethans
92f8f19d50
Fixed GH-8471: Segmentation fault when converting immutable and mutable DateTime instances created using reflection
2022-05-05 12:10:50 +01:00
Derick Rethans
d54bcbb43b
Add DatePeriod's __serialize and __unserialize methods ( #8464 )
2022-05-03 22:06:17 +01:00
Derick Rethans
ef30c9ed98
Update 32-bit only test
2022-04-29 14:19:27 +01:00
Derick Rethans
d57b05249c
Extended tests
2022-04-29 10:27:40 +01:00
Derick Rethans
cae1d4adde
Add support for serialising all DateInterval objects
2022-04-29 10:27:40 +01:00
Derick Rethans
c8a6a8abc0
Rename have_special_relative to from_string, fix serialisation constraint, and reorder fields
2022-04-29 10:27:40 +01:00
Derick Rethans
c280121b72
Add a few test cases for DateInterval
2022-04-29 10:27:40 +01:00
Derick Rethans
f4e5010aa9
Show the 'have_special_relative' property in var_dumps, and disallow serialization if set
2022-04-29 10:27:40 +01:00
Derick Rethans
3be8b5f5cb
Remove fake properties from DateInterval
2022-04-29 10:26:50 +01:00
Derick Rethans
181623f9c0
Add DateTimeZone's __serialize and __unserialize methods
2022-04-29 09:44:27 +01:00
Derick Rethans
8b2ee5388c
Add DateTime/DateTimeImmutable's __serialize and __unserialize methods
2022-04-29 09:44:27 +01:00
Marco Pivetta
25cb9cdb79
Fix GH-8232 - always reference classes in var_export() via their FQCN
...
Closes GH-8233
This fix corrects a behavior of `var_export()` that was mostly "hidden" until PHP 8.1 introduced:
* properties with object initializers
* constants containing object references
* default values of class properties containing `enum`s
Since `var_export(..., true)` is mostly used in conjunction with code generation,
and we cannot make assumptions about the generated code being placed in the root
namespace, we must always provide the FQCN of a class in exported code.
For example:
```php
<?php
namespace MyNamespace { class Foo {} }
namespace { echo "<?php\n\nnamespace Example;\n\n" . var_export(new \MyNamespace\Foo(), true) . ';'; }
```
produces:
```php
<?php
namespace Example;
MyNamespace\Foo::__set_state(array(
));
```
This code snippet is invalid, because `Example\MyNamespace\Foo::__set_state()` (which
does not exist) is called.
With this patch applied, the code looks like following (valid):
```php
<?php
namespace Example;
\MyNamespace\Foo::__set_state(array(
));
```
Ref: https://github.com/php/php-src/issues/8232
Ref: https://github.com/Ocramius/ProxyManager/issues/754
Ref: https://externals.io/message/117466
2022-04-23 11:06:21 +02:00
Derick Rethans
a690a56a86
Merge branch 'PHP-8.1'
2022-04-22 10:31:22 +01:00
Derick Rethans
15ee285f83
Merge branch 'PHP-8.0' into PHP-8.1
2022-04-22 10:31:14 +01:00
Derick Rethans
c854bb2472
Fixed GH-8400: bug73837.phpt makes no sense
...
Replaces the indeed silly test with something that actually does the job,
albeit much slower.
2022-04-22 10:29:37 +01:00