Commit Graph

2135 Commits

Author SHA1 Message Date
Máté Kocsis
2f7309b1e9
Use RETURN_THROWS() during ZPP in the date, dba and dom extensions 2019-12-31 00:21:37 +01:00
Christoph M. Becker
dabc28d182 Fix #78880: Spelling error report
We fix the most often occuring typos according to a recent codespell
report[1] in tests, code comments and documentation.

[1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html>.
2019-12-21 11:58:00 +01:00
Nikita Popov
69eaddabf8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove DateTime class registration test
2019-12-16 18:57:47 +01:00
Nikita Popov
8e12f04b5e Remove DateTime class registration test
This test is more annoying than useful.
2019-12-16 18:57:19 +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
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +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
43a1363a05 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test case
2019-10-18 16:24:14 +02:00
Christoph M. Becker
81806db90b Fix test case
Cf. <https://github.com/php/php-src/pull/4687>.
2019-10-18 16:23:56 +02: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
Derick Rethans
087d8cd214 Merge branch 'PHP-7.4' 2019-10-15 21:01:05 +01:00
Derick Rethans
3f7cc8361c Merge branch 'PHP-7.3' into PHP-7.4 2019-10-15 21:00:57 +01:00
Derick Rethans
3725a446ba Import timelib version 2018.03 2019-10-15 21:00:39 +01: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
5f80eb7842 Fix required number of arguments in stubs
* get_parent_class() argument is optional
* Mark array_filter() $callback as optional
* The $base of gmp_strval() is optional
* DateTime constructor also accepts zero arguments
* hash_update_file() stream context is optional
* xmlwriter_write_dtd_entity() $isparam argument is optional
2019-10-07 16:33:41 +02: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
Derick Rethans
a0eef7067b Updated to version 2019.3 (2019c) 2019-10-02 23:39:12 +01:00
Derick Rethans
a46bdcb631 Updated to version 2019.3 (2019c) 2019-10-02 23:39:11 +01:00
Derick Rethans
0505fbf2e5 Updated to version 2019.3 (2019c) 2019-10-02 23:39:09 +01:00
Nikita Popov
2f92957fd3 Convert some notices to warnings
Part of https://wiki.php.net/rfc/engine_warnings.
2019-10-02 10:34:08 +02:00
Nikita Popov
235983dfde Merge branch 'PHP-7.4' 2019-09-30 17:52:39 +02:00
Fabien Villepinte
0aa3acc6c4 Fix borked SKIPIFs 2019-09-30 17:51:41 +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
Kyle
b17957eaac Add missing parameters to __set_state() methods
Closes GH-4526.
2019-08-12 15:20:23 +02:00
Derick Rethans
0835e66372 Updated to version 2019.2 (2019b) 2019-08-11 16:06:00 +01:00
Derick Rethans
f465560a0f Updated to version 2019.2 (2019b) 2019-08-11 16:05:59 +01:00
Derick Rethans
7aa1dd3ba1 Updated to version 2019.2 (2019b) 2019-08-11 16:05:58 +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
Matteo Beccati
13980414eb Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test when default TZ is not UTC
2019-08-09 09:58:36 +02:00
Matteo Beccati
00dd786ba4 Fix test when default TZ is not UTC 2019-08-09 09:58:10 +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
Christoph M. Becker
7556600dfc Fix #65547: Default value for sunrise/sunset zenith still wrong
The value of the zenith angle to calculate sunrise and sunset times is
commonly defined as 90°50', and is "obtained by adding the average
apparent radius of the Sun (16') to the average amount of atmospheric
refraction at the horizon (34')", according to
http://aa.usno.navy.mil/faq/docs/RST_defs.php.

This value is also used for the Sunrise/Sunset Algorithm published in
the Almanac for Computers, 1990, see
https://web.archive.org/web/20161202180207/http://williams.best.vwh.net/sunrise_sunset_algorithm.htm.
2019-07-15 13:52:09 +02:00