1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Commit Graph

2018 Commits

Author SHA1 Message Date
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
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
Nikita Popov 3974180f92 Remove dead "props" member from date objects 2019-04-18 15:05:43 +02: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
Gabriel Caruso 656db96eb9 Remove HAVE_* for always available extensions 2019-04-14 11:44:12 -03:00
Nikita Popov c708c4b404 Avoid time(NULL) call if explicit timestamp given
As suggested by Benjamin Coutu.
2019-04-08 09:43:47 +02:00
Derick Rethans 83c9906bdb Updated to version 2019.1 (2019a) 2019-04-01 10:38:41 +01:00
Derick Rethans a22bd7a3a8 Updated to version 2019.1 (2019a) 2019-04-01 10:38:40 +01:00
Nikita Popov 1b411c039f Merge branch 'PHP-7.3' into PHP-7.4 2019-03-18 10:14:03 +01:00
Nikita Popov 00cfa1a367 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-18 10:11:25 +01:00
Nikita Popov a573c0e9ed Fix unused variable warning 2019-03-18 10:11:00 +01:00
Derick Rethans d209ccd4cc Merge branch 'PHP-7.2' into PHP-7.3 2019-03-17 14:55:53 -04:00
Derick Rethans ab07bc1fff Fixed 7.2 compat issue 2019-03-17 14:53:56 -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 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
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 94d509363d Remove more zpp error tests 2019-03-05 11:02:31 +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
Peter Kokot a8c3e22d23 Replace PHP_TM_GMTOFF with AC_CHECK_MEMBERS
Changes:
- PHP_TM_GMTOFF removed
- HAVE_TM_GMTOFF replaced with HAVE_STRUCT_TM_TM_GMTOFF
- HAVE_TM_ZONE replaced with HAVE_STRUCT_TM_TM_ZONE
- HAVE_TZNAME removed

The PHP_TM_GMTOFF macro can be replaced with Autoconf's AC_CHECK_MEMBERS
that defines the HAVE_STRUCT_TM_TM_GMTOFF symbol instead of the
HAVE_TM_ZONE.

The HAVE_TZNAME symbol is not used in current code. The obsolete
HAVE_TM_ZONE symbol has been replaced with more proper
HAVE_STRUCT_TM_TM_ZONE. These are defined by the AC_STRUCT_TIMEZONE
macro.
2019-03-04 12:13:12 +01: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 c0e15a3b7f Implement fine-grained conflict handling
Tests can specify conflict keys, either in --CONFLICTS-- or
a per-directory CONFLICTS file. Non-conflicting tests may be run
in parallel.
2019-02-20 11:20:40 +01:00
Andrea Faulds 39792f5bb7 run-tests.php: experimental parallel testing support 2019-02-18 14:58:53 +01:00
Peter Kokot 17310fd7d7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Refactor timelib.m4
2019-02-13 19:26:37 +01:00
Peter Kokot a89948320b Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Refactor timelib.m4
2019-02-13 19:26:02 +01:00
Peter Kokot 0ffa84d740 Refactor timelib.m4
The ext/date/lib is bundled library and also includes additional
timelib.m4 macros and checks specific for PHP.

All the checks in the timelib.m4 are already done in the PHP's
configure.ac:
- headers except for io.h and strings.h
- two functions checked strftime and gettimeofday
- if size of longint is 8
- if size of int is 4
- int32_t and uint32_t types using the PHP_CHECK_STDINT_TYPES

Macro `AC_TIMELIB_C_BIGENDIAN` defined in timelib.m4 is not used.

The two checkings for strtoll and atoll have been moved to date extension's
config0.m4 file.

Additional check for headers <io.h> and <strings.h> has been added to
config0.m4 of the date extension.

Therefore the timelib.m4 can be simplified and removed from the bundled
library to have easier maintenance in the later branches and also
upstream library.
2019-02-13 19:24:39 +01:00
Nikita Popov e27af3bbea Merge branch 'PHP-7.3' into PHP-7.4 2019-02-12 09:57:38 +01:00
Nikita Popov 8ed775f548 Merge branch 'PHP-7.2' into PHP-7.3 2019-02-12 09:57:18 +01:00
Nikita Popov a109fddba4 Remove "defensive copy" of DatePeriod properties
get_properties() constructs these as fresh objects with no relation
to the internals, there is no need to clone them again. Additionally
the current implementation leaks memory, because the original objects
are never freed (see PR #3121).
2019-02-12 09:54:52 +01:00
MarkBaker 31b2dcb26c Tests for __set_state magic method
Tests for __set_state magic method for DateTime, DateTimeImmutable,
DateTimeZone and DatePeriod.
2019-02-09 17:18:23 +01:00
Mark Niebergall 1253a68926 Add test for date_time_immutable invalid arguments 2019-02-09 17:05:22 +01:00
Nikita Popov 8bc663f43b Remove zpp variation tests 2019-02-05 09:38:55 +01:00
Peter Kokot 92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski 0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Nikita Popov e219ec144e Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2

This is a squash of PR #3734, which is a squash of PR #3313.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Derick Rethans 362f8b5f97 Merge branch 'PHP-7.3' 2019-01-07 12:49:01 +00:00
Derick Rethans 24b446291d Merge branch 'PHP-7.2' into PHP-7.3 2019-01-07 12:48:49 +00:00
Derick Rethans bd1d2c7bfe Update tests due to data changes in tzdata 2018i 2019-01-07 12:48:42 +00:00
Derick Rethans 1eedfe70ae Updated to version 2018.9 (2018i) 2019-01-07 11:50:17 +00:00
Derick Rethans 11105e90c4 Updated to version 2018.9 (2018i) 2019-01-07 11:50:16 +00:00
Derick Rethans 81da7f75e3 Updated to version 2018.9 (2018i) 2019-01-07 11:50:14 +00:00
Derick Rethans e7e8112fcd Merge branch 'PHP-7.3' 2018-12-23 17:57:23 +00:00
Derick Rethans a9a084c092 Update API use due to changes in timelib 2018.01RC3 2018-12-23 17:54:57 +00:00
Derick Rethans 3e4a3d005a Upgrade timelib to 2018.01RC3 2018-12-23 17:54:37 +00:00
Derick Rethans 6863afe055 Merge branch 'PHP-7.3' 2018-11-28 20:35:35 +00:00