Commit Graph

938 Commits

Author SHA1 Message Date
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Anatol Belski
298de027d6 Reduce struct size by 8 bytes on 64-bit 2018-02-19 10:12:46 +01:00
Gabriel Caruso
079598a85d
Use zend_parse_parameters_none_throw 2018-02-18 09:36:35 +01:00
Anatol Belski
325934c057 Simplify declaration 2018-02-16 15:44:41 +01:00
Anatol Belski
1c68f54684 Merge branch 'PHP-7.2'
* PHP-7.2:
  Wrap var depending on conditional compilation
2018-02-16 13:42:04 +01:00
Anatol Belski
4800a95e72 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Wrap var depending on conditional compilation
2018-02-16 13:41:13 +01:00
Anatol Belski
da0ed5cdb1 Wrap var depending on conditional compilation 2018-02-16 13:40:44 +01:00
Anatol Belski
e5db3054a1 Fix duplicated strlen call 2018-02-16 12:52:59 +01:00
Anatol Belski
3f4598ec51 Remove unnecessary conditions and improve assignment 2018-02-16 12:52:59 +01:00
Anatol Belski
9e5595ef38 Reduce var scope 2018-02-16 12:52:59 +01:00
Anatol Belski
119be77051 Reduce var scope 2018-02-16 12:52:59 +01:00
Anatol Belski
0e52da475a Reduce variable scope 2018-02-16 12:52:58 +01:00
Anatol Belski
27908bace1 Reduce variable scope 2018-02-15 21:34:55 +01:00
Anatol Belski
646dad6160 Use explicit for more type safety 2018-02-15 21:30:16 +01:00
Anatol Belski
9258be351f Reduce variable scope 2018-02-15 21:26:01 +01:00
Anatol Belski
567d01ae20 Remove condition that is always false 2018-02-15 21:19:33 +01:00
Gabriel Caruso
a5f1a585e6 Removed unused variables 2018-02-11 22:46:33 +01:00
Gabriel Caruso
fef879a2d6 Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".

This a followup to ce1d69a1f6, which
implements the same change for integer->int.
2018-02-04 23:09:40 +01:00
Gabriel Caruso
ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Gabriel Caruso
affc20f891 Use bool instead of boolean in proto 2018-02-04 17:00:24 +01:00
Gabriel Caruso
c6c9e71a5b Add missing SKIPIF sections 2018-02-03 13:54:34 +01:00
Gabriel Caruso
8034fdc9d9 Use int instead of integer in proto 2018-02-02 22:32:15 +01:00
Nikita Popov
e061a4e9e4 Drop the ext/intl/doc directory
Drop outdated documentation stubs. Better intl documentation is
available in the manual...
2018-01-26 22:13:11 +01:00
Dmitry Stogov
ecd2624875 Avoid array duplication and in-place modification 2018-01-17 02:25:36 +03:00
Gabriel Caruso
a56ea44431 Remove trailing whitespace in C++ files
[ci skip]
2018-01-06 21:38:09 +01:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Nikita Popov
3538cbe6c0 Use free_obj for intl ResourceBundle
Partial fix for bug #67911, the part about __destruct() not being
called.
2017-12-28 12:25:01 +01:00
Nikita Popov
b2b2b437af Add _IS_NUMBER as cast_object() target type
convert_scalar_to_number() will now call cast_object() with an
_IS_NUMBER argument, in which case the cast handler should return
either an integer or floating point number, whichever is more
appropriate.

Previously convert_scalar_to_number() unconditionally converted
objects to integers instead.

Fixes bug #53033.
Fixes bug #54973.
Fixes bug #73108.
2017-12-26 12:39:06 +01:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Dmitry Stogov
1db8402208 Move zend_object_iterator_funcs structures into read-only data segment 2017-12-14 14:21:22 +03:00
Peter Kokot
2783b1c823 Remove outdated TODO files
Some extensions included TODO files that has been present for several
years in the repository tree without changes. This included:

- ext/phar
- ext/intl
- ext/zip
- ext/soap
- ext/pdo
- ext/spl
- ext/dom
- ext/gmp
- ext/xmlwriter
- ext/xmlreader

ext/phar feature request has been created instead, and for others it
would be better to use wiki and RFC workflow instead based on current
feature requests and further PHP development requirements.

[ci skip]
2017-12-09 19:18:58 +01:00
Dmitry Stogov
583050eda3 Removed useless separations 2017-12-07 22:34:38 +03:00
Dmitry Stogov
234306c7ac Cleanup type conversion 2017-12-07 22:34:08 +03:00
Dmitry Stogov
6a9d2b2190 Cleanup type conversion 2017-12-07 19:24:55 +03:00
Kalle Sommer Nielsen
23cfe1f06f Remove this redundant define 2017-12-04 16:43:48 +01:00
Nuno Lopes
7b085635d7 fix build of intl/calendar 2017-12-03 17:58:40 -05:00
Nikita Popov
b72b1a4e4d Add zend_object_alloc() API
Using ecalloc() to create objects is expensive, because the
dynamic-size memset() is unreasonably slow. Make sure we only
zero the main object structure with known size, as the properties
are intialized separately anyway.

Technically we do not need to zero the embedded zend_object
structure either, but as long as the memset argument is constant,
a couple more bytes don't really matter.
2017-11-25 17:12:37 +01:00
Nikita Popov
26f8fc833b Enable and fix printf() format warnings
Add _unchecked() variants of zend_spprintf and zend_strpprintf for
cases where we specifically want to disable these checks, such as
use of %H.
2017-11-16 21:15:36 +01:00
Anatol Belski
a3e1bea4be Merge branch 'PHP-7.2'
* PHP-7.2:
  Sync and fix tests for ICU 60.1 compat
2017-11-02 12:39:34 +01:00
Anatol Belski
8a4702223d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync and fix tests for ICU 60.1 compat
2017-11-02 12:39:04 +01:00
Anatol Belski
e8af216ce5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Sync and fix tests for ICU 60.1 compat
2017-11-02 12:38:32 +01:00
Anatol Belski
dbfa0140ae Sync and fix tests for ICU 60.1 compat 2017-11-02 12:37:04 +01:00
Anatol Belski
0fe6724fce Rethink the version checks
As the actual behavior change happens with ICU >= 58, the new
functionality should stay same in the lower versions. This comply also
with lower PHP versions so far.
2017-10-30 19:52:27 +01:00
Anatol Belski
2b43c623b9 Fix typo 2017-10-30 18:28:39 +01:00
Anatol Belski
3ce3e96af3 Proper ICU version check for restriction levels availability 2017-10-30 18:21:14 +01:00
Anatol Belski
c35f69327c Merge branch 'PHP-7.2'
* PHP-7.2:
  Add missing ICU version check
2017-10-30 18:17:20 +01:00
Anatol Belski
e3b2859c8a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add missing ICU version check
2017-10-30 18:16:47 +01:00
Anatol Belski
6eb4daabeb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add missing ICU version check
2017-10-30 18:16:03 +01:00
Anatol Belski
68c500421c Add missing ICU version check 2017-10-30 18:15:26 +01:00
Dmitry Stogov
fad75a54d4 Merge branch 'master' into rc_debug
* master: (26 commits)
  Better fix for bug #75451 (Assertion fails while foreach on empty xpath query)
  Catch with the latest AppVeyor unzip errors
  Fixed type inference
  Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
  Fix compiler warnings
  We don't use a specific model for a MAKERNOTE so remove these checks that doesn't do anything anyway
  Remove these old comments, as for the TODO, there is already a FR for this
  Re-enable AppVeyor cache
  make sure run-tests reports exit status upon prerequisite error
  Remove implicit constants from test case
  Fix invalid read in zend_use_undefined_constant()
  Fix invalid read in mb_ord()
  Remove --with-libmbfl configure option
  Fixed bug #75451 (Assertion fails while foreach on empty xpath query)
  Add tests for UConverter::getStandards()
  convert spaces to tabs in ext/ftp/tests/server.inc
  Add tests for ftp_rename
  Fix bug #75434 Wrong reflection for mysqli_fetch_all function
  Don't optimize input arrays with suffix holes
  Fix bug #75307 Wrong reflection for openssl_open function
  ...
2017-10-30 12:11:35 +03:00