Commit Graph

679 Commits

Author SHA1 Message Date
Zeev Suraski
9afce019e0 Future-proof email addresses 2018-11-01 18:35:32 +02:00
Peter Kokot
b746e69887 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:32:30 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
1c850bfcca 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:55:24 +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
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
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
Gabriel Caruso
c6c9e71a5b Add missing SKIPIF sections 2018-02-03 13:54:34 +01:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
0f06df310c Turn "php_stream_wrapper"s into constants
Keep non-constant "php_stream_wrapper"s in API functions and callbacks for compatibility.
2017-12-14 22:46:22 +03:00
Dmitry Stogov
83e495e0fd Move constants into read-only data segment 2017-12-14 22:14:36 +03:00
Sara Golemon
8f804a2128
Add support for zlib/level context option 2017-10-23 22:14:52 -04:00
Christoph M. Becker
a332eaf7f6 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix Bug #75299 Wrong reflection on inflate_init and inflate_add
2017-10-11 17:40:12 +02:00
Christoph M. Becker
1f150fcde1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix Bug #75299 Wrong reflection on inflate_init and inflate_add
2017-10-11 17:30:45 +02:00
Christoph M. Becker
d3d23e0cb8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix Bug #75299 Wrong reflection on inflate_init and inflate_add
2017-10-11 17:29:36 +02:00
Fabien Villepinte
9d9873b3b5 Fix Bug #75299 Wrong reflection on inflate_init and inflate_add 2017-10-01 11:27:16 +02:00
Florian Engelhardt
8158a95b53 reworked test 2017-09-14 12:41:02 +02:00
Florian Engelhardt
5e55ce30df added credits for #phptestfest 2017-09-14 09:21:00 +02:00
Florian Engelhardt
feb16a492b reworked the tests, created test cases for defalte, gzip and unsupported brotli 2017-09-14 09:17:45 +02:00
Florian Engelhardt
9e8eca1d3d added basic zlib_get_coding_type() test 2017-09-13 15:18:21 +02:00
Kalle Sommer Nielsen
c34ba92782 Get rid of all these old package[2].xml files, most of these had no had a release since PHP4, or any release at all in close to 10 years, some even did not have a package registered at pecl
OCI, PDO_OCI and zip are left as they are actively developed and released there
2017-08-17 22:09:29 +02:00
Anatol Belski
07c7445dd0 fix datatype 2017-07-10 17:34:58 +02:00
Anatol Belski
7360e6a36f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Revert "Add more constants, improve comments, and add tests"
2017-07-10 17:01:25 +02:00
Anatol Belski
a797421e98 Revert "Add more constants, improve comments, and add tests"
This reverts commit 0c4f11ecaa.
2017-07-10 16:53:56 +02:00
Tom Van Looy
04fb3f28ff Remove superfluous semicolons 2017-06-26 00:23:25 +02:00