Commit Graph

700 Commits

Author SHA1 Message Date
Joe Watkins
f16b012116
fix mac tests on azure 2019-06-14 12:55:00 +02:00
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Peter Kokot
bd1bd38a35 Use *.data for fixture files 2019-05-17 03:59:23 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Nikita Popov
2371c65a28 Fix file name clash in zlib tests 2019-04-26 15:05:42 +02:00
Nikita Popov
397ee767fd Make zlib include_path tests more robust
One file is placed inside the script directory, we need to make
sure it has a unique name as well.
2019-04-10 13:39:17 +02:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Nikita Popov
94d509363d Remove more zpp error tests 2019-03-05 11:02:31 +01:00
Nikita Popov
1c9fe30425 Fix directory collisions in zlib tests 2019-02-22 11:25:52 +01:00
Nikita Popov
b5f852a8cb Some more test removals
Noticed these while implementing error handler changes.
2019-02-05 12:42:18 +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
e595f5cd8a Migrate ext/zlib to use pkg-config
There are other extensions checking for zlib as well, not quite
sure what to do there with regard to option names.
2018-12-26 16:59:24 +01:00
Zeev Suraski
67e0138c0d Future-proof email addresses... 2018-11-01 18:30:28 +02:00
Peter Kokot
4f1274c59b Remove value from --CGI-- section
The `--CGI--` section takes no value and is enabled as empty already.
2018-10-15 07:13:53 +02:00
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:33:09 +02:00
Peter Kokot
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Peter Kokot
1ad08256f3 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:56:38 +02:00
Peter Kokot
a2e099c78d Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix failing ext/zlib/tests due to whitespace
2018-10-13 15:16:29 +02:00
Peter Kokot
3764bd7997 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix failing ext/zlib/tests due to whitespace
2018-10-13 15:16:15 +02:00
Peter Kokot
102cf75eeb Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix failing ext/zlib/tests due to whitespace
2018-10-13 15:15:39 +02:00
Peter Kokot
9120e79e9f Fix failing ext/zlib/tests due to whitespace 2018-10-13 15:15:26 +02:00
Peter Kokot
37c329d715 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
Peter Kokot
3362620b5f Trim trailing whitespace in source code files 2018-10-13 14:16:33 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot
7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +02:00
Peter Kokot
c951836721 Remove unused files
- ext/simplexml/tests/bug25756_1.xml
- ext/simplexml/tests/bug25756_2.xml
- ext/simplexml/tests/bug25756.xsd
Added via 503d74aa29 and then removed via
9e29f17493

- ext/mysqli/tests/cacert.pem
- ext/mysqli/tests/client-cert.pem
- ext/mysqli/tests/client-key.pem
Added via e9f9f66f2e and then removed via
6d51b7b2e3

- ext/gd/tests/simpletext私はガラスを食べられます.jpg
Added via 3d3f11ede4 and never used

- ext/gd/tests/src.png
Added via cc938b5df0 and never used

- ext/zlib/tests/gzgetss.test
Added via d536ecac5c as a file content of the
ext/zlib/tests/gzgetss.gzbut but never used in tests directly. Removed for
better clarity of zlib tests

- ext/soap/tests/interop/Round3/GroupD/round3_groupD_import2_absolute.wsdl
- ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimerpc.wsdl
- ext/soap/tests/interop/Round4/GroupG/round4_groupG_mimedoc.wsdl
Added via 1d25fc5c7b and never used

- ext/reflection/tests/exception.inc
Removed via 9f8ba2e8a1

- ext/phar/tests/files/extracted.inc
Removed via 549bf83bd1

- ext/phar/tests/cache_list/files/extracted.inc
Added via 05c3104097 and never used
2018-09-26 12:54:20 +02:00
Peter Kokot
50b4b63cc6 Remove outdated zlib readme file for windows build 2018-09-23 22:52:23 +02:00
Christoph M. Becker
58e2f5ead1 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #75273: php_zlib_inflate_filter() may not update bytes_consumed
2018-09-08 19:13:26 +02:00
Christoph M. Becker
fa70b91a4f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #75273: php_zlib_inflate_filter() may not update bytes_consumed
2018-09-08 19:09:56 +02:00
Christoph M. Becker
90d863898c Fix #75273: php_zlib_inflate_filter() may not update bytes_consumed
Whenever we return with `PSFS_PASS_ON`, we need to update
`bytes_consumed` to not mislead the caller.  Instead of fixing the
respective `if` clauses, we eschew the early bail-outs to simplify the
code a bit.
2018-09-08 19:01:36 +02:00
Peter Kokot
fefaeae49c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #76709: Minimal required zlib library is 1.2.0.4
2018-08-06 09:39:52 +02:00
Peter Kokot
fab7d9f577 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #76709: Minimal required zlib library is 1.2.0.4
2018-08-06 09:39:33 +02:00
Peter Kokot
a3e3d914ed Fix bug #76709: Minimal required zlib library is 1.2.0.4
The minimal required version of zlib system library is 1.2.0.4 instead
of 1.0.9 as reported in the ./configure --help.
2018-08-06 09:37:16 +02:00
Peter Kokot
523cf6e2e7 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #65988: Zlib version check fails
2018-08-06 06:16:07 +02:00
Peter Kokot
eceecb6900 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #65988: Zlib version check fails
2018-08-06 06:15:51 +02:00
Jay Bonci
c8a90606c1 Fix bug #65988: Zlib version check fails
When an 'include/zlib/' style dir is passed to --with-zlib configure
option the zlib version check fails.
2018-08-06 06:14:11 +02:00
Peter Kokot
cf3b852109 Trim trailing whitespaces in build files
Some editors utilizing .editorconfig automatically trim whitespaces. For
convenience this patch removes whitespaces in certain build files:
- ext/*/config*.m4
- configure.ac
- acinclude.m4
2018-07-29 03:43:45 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Nikita Popov
d9acfa45b8 Deprecate fgetss() and gzgetss()
SplFileObject::fgetss() will also generate a deprecation notice
through an internal call to fgetss().

Part of RFC https://wiki.php.net/rfc/deprecations_php_7_3.
2018-07-21 22:38:35 +02:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Dmitry Stogov
524f5245c5 Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string. 2018-05-08 17:30:15 +03:00
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
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
84488d921b Remove superfluous SKIPIF sections in more tests 2018-02-04 16:57:08 +01:00
Stanislav Malyshev
3616b6b935 Cleanup some tests - remove unnecessary sections
Also unify credits - all are under --CREDITS-- now.
2018-02-04 02:21:40 -08:00