Máté Kocsis
ffcc8135e2
Convert UNKNOWN default values to null in ext/date
...
Closes GH-5509
2020-05-02 11:05:37 +02:00
Máté Kocsis
1d05771a70
Add support for generating method entries from stubs
...
Closes GH-5363
2020-04-11 09:15:14 +02:00
Máté Kocsis
7c3078737f
Generate function entries from stubs for a couple of extensions
...
Closes GH-5347
2020-04-04 20:41:48 +02:00
Nikita Popov
fb5bfcb75b
Add a ZEND_UNCOMPARABLE value
...
To explicitly indicate that objects are uncomparable. For now
this has no functional difference from the usual 1 return value,
but makes intent clearer.
2020-03-31 12:36:48 +02:00
Christoph M. Becker
6b6f0d63f3
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #74940 : DateTimeZone loose comparison always true
2020-03-30 09:18:20 +02:00
Christoph M. Becker
a2f8c78183
Fix #74940 : DateTimeZone loose comparison always true
...
Since `DateTimeZone` does not implement a `compare_objects` handler,
nor has any properties, two `DateTimeZone` instances always compare as
being equal, even if they designate totally different timezones. Even
worse, after calling `var_dump()` on these objects, the actual
comparison may yield a correct result.
We therefore introduce a `compare_objects` handlers, which prevents
different behavior before/after `var_dump()`, and which allows us to
clearly define the intended semantics.
2020-03-30 09:03:40 +02:00
Christoph M. Becker
8ea143a943
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #79396 : DateTime hour incorrect during DST jump forward
2020-03-19 08:53:46 +01:00
Christoph M. Becker
1d9e716a47
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #79396 : DateTime hour incorrect during DST jump forward
2020-03-19 08:51:55 +01:00
Nate Brunette
d70058a139
Fix #79396 : DateTime hour incorrect during DST jump forward
...
When you attempt to set the time to a non-existent time occuring during
a DST jump forward, the hour does not move forward correctly.
2020-03-19 08:50:34 +01:00
Nikita Popov
58b17906f5
Apply tidy formatting
...
Mostly reindent PHP scripts to spaces.
2020-02-03 13:41:31 +01:00
Nikita Popov
a66e226713
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix DatePeriod property handling with indirect modification
2020-01-30 13:14:29 +01:00
Nikita Popov
01d30f880a
Fix DatePeriod property handling with indirect modification
...
We do need to implement get_property_ptr_ptr to make arrays work
correctly.
2020-01-30 13:09:47 +01:00
Nikita Popov
0078727866
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix leak in DateTimeImmutable::modify()
2020-01-30 12:17:15 +01:00
Nikita Popov
187f359549
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix leak in DateTimeImmutable::modify()
2020-01-30 12:17:10 +01:00
Nikita Popov
494615fcb8
Fix leak in DateTimeImmutable::modify()
2020-01-30 12:16:56 +01:00
Nikita Popov
472fc3a2a9
Fix leak in DatePeriod construction with invalid format
...
Same issue as I fixed in DateInterval construction before.
2020-01-30 11:13:04 +01:00
Nikita Popov
648f16c2ec
Fix rel_date leak on DateInterval construction failure
2020-01-28 13:11:49 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
...
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
mike
1658b5babc
Adding DateTime(Immutable)::createFromInterface()
...
These are like
DateTime::createFromImmutable()
DateTimeImmutable::createFromMutable()
but accept any DateTimeInterface instead.
Closes GH-5016.
2020-01-03 16:55:12 +01:00
Christoph M. Becker
1400f4ac12
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #79015 : undefined-behavior in php_date.c
2020-01-03 14:32:56 +01:00
Christoph M. Becker
40b2f82380
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #79015 : undefined-behavior in php_date.c
2020-01-03 14:32:30 +01:00
Christoph M. Becker
b48f2625b5
Fix #79015 : undefined-behavior in php_date.c
...
We check that the given microsecond fraction is in the valid range
[0, 1000000[, and otherwise mark it as invalid. We also drop the
useless do loop; a plain block is sufficient here.
2020-01-03 14:31:03 +01:00
Máté Kocsis
1b93cfee0c
Use RETURN_THROWS() after zend_parse_method_parameters()
2020-01-02 23:01:37 +01:00
Máté Kocsis
349a286461
Use RETURN_THROWS() after zend_throw_error()
2020-01-01 16:42:30 +01:00
Máté Kocsis
2f7309b1e9
Use RETURN_THROWS() during ZPP in the date, dba and dom extensions
2019-12-31 00:21:37 +01:00
Nikita Popov
0cec268d15
Support single class unions in gen stubs
2019-11-15 17:19:26 +01:00
Nikita Popov
468ecf295d
Fix DateTimeImmutable stubs
...
These were referencing the arginfo from the functions, instead of
the methods, which isn't right, as the functions have return types.
2019-11-15 16:02:26 +01:00
Máté Kocsis
2204dbde3b
Add missing ZPP checks
...
Closes GH-4878.
2019-11-01 15:26:52 +01:00
Máté Kocsis
9493893412
Cleanup return values when parameter parsing is unsuccessful
2019-10-30 16:05:20 +01:00
Nikita Popov
6719d3e718
Add Z_PARAM_STRING/ARRAY_OR_NULL convenience macros
2019-10-29 13:29:52 +01:00
Christoph M. Becker
f9a98f6dbd
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #78751 : Serialising DatePeriod converts DateTimeImmutable
2019-10-28 13:09:44 +01:00
Christoph M. Becker
9e4c5db733
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78751 : Serialising DatePeriod converts DateTimeImmutable
2019-10-28 13:09:24 +01:00
Christoph M. Becker
736cd93ef5
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #78751 : Serialising DatePeriod converts DateTimeImmutable
2019-10-28 13:08:34 +01:00
Christoph M. Becker
89c327f884
Fix #78751 : Serialising DatePeriod converts DateTimeImmutable
...
When getting the properties of a DatePeriod instance we have to retain
the proper classes, and when restoring a DatePeriod instance we have to
cater to DateTimeImmutable instances as well.
2019-10-28 13:07:28 +01:00
Christoph M. Becker
2484f1e88a
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #70153 \DateInterval incorrectly unserialized
2019-10-18 15:33:58 +02:00
Christoph M. Becker
197568d634
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #70153 \DateInterval incorrectly unserialized
2019-10-18 15:33:25 +02:00
Christoph M. Becker
c7c7ab53ac
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #70153 \DateInterval incorrectly unserialized
2019-10-18 15:32:08 +02:00
m.yakunin
d2cde0bfd3
Fix #70153 \DateInterval incorrectly unserialized
...
Added a separate macro for reading 'days' property, so that bool(false)
is correctly converted to the proper internal representation.
2019-10-18 15:31:14 +02:00
Dmitry Stogov
b02b81299c
Comparison cleanup:
...
- introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval)
- remove compare_objects() object handler, and keep only compare() handler
2019-10-07 17:57:49 +03:00
Nikita Popov
647b1c7fcf
Remove most uses of ZEND_PARSE_PARAMETERS_END_EX()
...
As ZPP now throws, it makes no sense to specify an explicit return
value.
2019-10-07 10:02:18 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
...
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
962a9cd74e
Merge branch 'PHP-7.4'
2019-09-19 11:36:29 +02:00
Nikita Popov
22516b7d8a
Merge branch 'PHP-7.3' into PHP-7.4
2019-09-19 11:36:19 +02:00
Nikita Popov
f53b8268d6
Merge branch 'PHP-7.2' into PHP-7.3
2019-09-19 11:36:09 +02:00
CJDennis
e3255a4f49
Fix typo
...
`sizeof("data")-1` and `sizeof("date")-1` are both 4, so no change in behaviour
2019-09-19 11:36:00 +02:00
Craig Duncan
06aa2ae993
Update the date class arginfo the new format
2019-08-12 20:57:30 +01:00
Nikita Popov
3b2f2ce474
Make uninitialized DateTime an Error
...
This avoids many spurious false return values.
2019-08-09 14:51:25 +02:00
Nikita Popov
33886f710c
Generate arginfo from PHP stub files
...
Signature stubs for internal functions are specified in xyz.stub.php,
from which we generate actual arginfo structures in xyz_arginfo.h.
This file then needs to be included in the implementation appropriately.
Arginfo from stubs can be regenerated using scripts/dev/gen_stub.php.
However, this should also automatically happen when the stub file is
modified.
2019-08-09 14:51:25 +02:00
Nikita Popov
527dad600b
Merge branch 'PHP-7.4'
2019-08-08 09:56:10 +02:00
Nikita Popov
fc17bfaacf
Fixed bug #78383
2019-08-08 09:55:52 +02:00