Commit Graph

980 Commits

Author SHA1 Message Date
Nikita Popov
3b2f2ce474 Make uninitialized DateTime an Error
This avoids many spurious false return values.
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
Nikita Popov
bbd12b3d30 Merge branch 'PHP-7.4' 2019-07-10 11:11:30 +02:00
Nikita Popov
9d82a01d01 Clean up DateTimeZone::getLocation() test
And avoid invalid array access.
2019-07-10 11:09:41 +02:00
Derick Rethans
73734eee6c Merge branch 'PHP-7.4' 2019-06-30 15:51:04 +01:00
Derick Rethans
a60128c503 Merge branch 'PHP-7.3' into PHP-7.4 2019-06-30 15:50:55 +01:00
Derick Rethans
cc3fe3bd30 Fixed tests due to changed timezone data 2019-06-30 15:50:38 +01:00
Nikita Popov
4d90848d68 Don't verify arginfo types for internal functions
To avoid duplicate type checks. In debug builds arginfo is still
checked and will generate an assertions if the function doesn't
subsequently throw an exception.

Some test results change due to differences in zpp and arginfo
error messages.
2019-06-17 11:46:28 +02:00
Craig Duncan
bc87424835 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add a test for bug #65672
  Ensure the internal properties cannot be overwritten
2019-05-30 19:15:58 +01:00
Craig Duncan
a08b3b6d19 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add a test for bug #65672
  Ensure the internal properties cannot be overwritten
2019-05-30 19:14:04 +01:00
Craig Duncan
370997fb5d Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add a test for bug #65672
  Ensure the internal properties cannot be overwritten
2019-05-30 18:55:55 +01:00
Craig Duncan
8b53c7232e Add a test for bug #65672 2019-05-30 18:55:42 +01:00
Craig Duncan
dc586bff36 Ensure the internal properties cannot be overwritten 2019-05-30 18:55:36 +01:00
Nikita Popov
cf610347a7 Merge branch 'PHP-7.4' 2019-05-29 09:52:43 +02:00
Nikita Popov
5a0df6a414 Merge branch 'PHP-7.3' into PHP-7.4 2019-05-29 09:47:54 +02:00
Nikita Popov
de7d0256a3 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-29 09:47:43 +02:00
Craig Duncan
5d67271db0 Add tests for DatePeriod properties 2019-05-29 09:47:10 +02:00
Peter Kokot
b60173af0b Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove duplicate variables
2019-05-12 03:06:19 +02:00
Vinicius Dias
188ece856d Remove duplicate variables
Removing duplicate variables `$beginDtObj` and `$beginTimestamp`.
2019-05-12 03:02:38 +02:00
Nikita Popov
fd2db11929 Always generate fatal error for LSP failures
RFC: https://wiki.php.net/rfc/lsp_errors
2019-05-07 13:45:28 +02:00
Nikita Popov
3a8304c35a Merge branch 'PHP-7.4' 2019-04-23 13:15:09 +02:00
Nikita Popov
3cfbbf2956 Make DateInterval objects uncomparable
Arbitrary DateInterval objects don't have well-defined comparison
semantics. Throw a warning and treat the objects as uncomparable.

Support for comparing DateInterval objects returned by
DateTime::diff() may be added in the future.
2019-04-23 13:12:06 +02:00
Peter Kokot
01cdae054b Merge branch 'PHP-7.4'
* PHP-7.4:
  Add test for date timestamp
2019-04-20 19:21:22 +02:00
Vitor Mattos
c050045faa Add test for date timestamp
- [date_timestamp_get] adding coverage for date_timestamp_get alias to
  DateTime::getTimestamp feature at PHPRio TestFest
- [date_timestamp_get] adding coverage for date_timestamp_get basic
  feature at PHPRio TestFest
- Combine tests into single file
2019-04-20 19:21:10 +02:00
Derick Rethans
b896819b99 Merge branch 'PHP-7.4' 2019-04-17 09:40:35 +01:00
Derick Rethans
4a3f64dfef Merge branch 'PHP-7.3' into PHP-7.4 2019-04-17 09:40:28 +01:00
Derick Rethans
6088713216 Merge branch 'PHP-7.2' into PHP-7.3 2019-04-17 09:40:18 +01:00
Ignace Nyamagana Butera
7b1a4e2400 Fixed bug #77909: DatePeriod::__construct() with invalid recurrence count value
Improve error message on invalid reccurence count

Adding test when reccurence is -1
2019-04-17 09:39:03 +01:00
Derick Rethans
ed2cbd49c8 Merge branch 'PHP-7.4' 2019-03-17 14:38:20 -04:00
Derick Rethans
0325e78f4f Merge branch 'PHP-7.3' into PHP-7.4 2019-03-17 14:38:11 -04:00
Derick Rethans
7e7ef44fab Merge branch 'PHP-7.2' into PHP-7.3 2019-03-17 14:38:04 -04:00
Ignace Nyamagana Butera
6eb83a63e1 Fixed bug #75113: Added DatePeriod::getRecurrences() method. 2019-03-17 14:37:35 -04:00
Peter Kokot
4b3da12363 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove HAVE_STRFTIME
2019-03-14 19:43:45 +01:00
Peter Kokot
3a857852a8 Remove HAVE_STRFTIME
Function strftime is part of the C89 standard [1] and current systems
don't need to check for its presence anymore.

Additionally, checks for strftime function in tests have been removed
since the PHP strftime function is now always available.

1: https://port70.net/~nsz/c/c89/c89-draft.html
2019-03-14 19:42:29 +01:00
Nikita Popov
852485d8ec Adjust tests for zpp TypeError change 2019-03-11 11:32:20 +01:00
Gabriel Caruso
726919e4b5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Use EXPECT when possible
  Fix tests filenames
2019-03-11 00:07:32 -03:00
Gabriel Caruso
6c4e2079c0 Use EXPECT when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2019-03-11 00:05:44 -03:00
Nikita Popov
a32b89f029 Merge branch 'PHP-7.4' 2019-03-05 11:03:09 +01:00
Nikita Popov
94d509363d Remove more zpp error tests 2019-03-05 11:02:31 +01:00
Nikita Popov
ae59537d84 Merge branch 'PHP-7.4' 2019-03-05 10:24:38 +01:00
Nikita Popov
b26df0e395 Remove tests for zpp failure conditions
These tests only check zpp error conditions, so drop them per
zpp testing policy.
2019-03-05 10:22:23 +01:00
Derick Rethans
29f15a1333 Merge branch 'PHP-7.4' 2019-02-28 13:52:46 +00:00
Derick Rethans
9624e87a8f Merge branch 'PHP-7.3' into PHP-7.4 2019-02-28 13:52:33 +00:00
Derick Rethans
d63a7aa6cf Merge branch 'PHP-7.2' into PHP-7.3 2019-02-28 13:51:10 +00:00
Derick Rethans
a890c5beb8 Fixed bug #50020 (DateInterval:createDateFromString() silently fails) 2019-02-28 13:50:35 +00:00
Nikita Popov
c8e2b333cb Merge branch 'PHP-7.4' 2019-02-20 11:22:31 +01:00