Commit Graph

594 Commits

Author SHA1 Message Date
Nikita Popov
0cb43ec51c Merge branch 'PHP-7.2' into PHP-7.3 2019-05-27 17:43:13 +02:00
Michael Maroszek
a0c9d0849a Fixed bug #76345 2019-05-27 17:42:20 +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
f1d7e3ca0b 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:31:31 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +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
60a69daec6 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:54:08 +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
Remi Collet
726a77cfdd Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  bump zip extension version
2018-10-03 12:59:31 +02:00
Remi Collet
da05b7e81e bump zip extension version 2018-10-03 12:59:01 +02:00
Peter Kokot
0eabd5231b Remove unused Git ident attributes from zip extension
$Id attributes were used with SVN. With Git most of the Git ident
attributes in source code files are not used anymore.
2018-07-27 15:49:34 +02:00
Gabriel Caruso
9e4d590b19
Remove extra semicolons 2018-07-25 21:47:04 -03:00
Anatol Belski
b9963969fd Merge branch 'PHP-7.2'
* PHP-7.2:
  Improve test
2018-07-13 20:15:17 +02:00
Anatol Belski
dee191ee07 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Improve test
2018-07-13 20:14:44 +02:00
Anatol Belski
141072a838 Improve test
Ensure the filename is non existent indeed.
2018-07-13 20:13:51 +02:00
Anatol Belski
d82cb24e19 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix bug #76524 - ZipArchive memory leak
2018-07-10 11:20:50 +02:00
Anatol Belski
ebb590b625 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #76524 - ZipArchive memory leak
2018-07-10 11:19:54 +02:00
timurib
08f08858f3 Fix bug #76524 - ZipArchive memory leak
Bugfix #76524: Free up zip internal state and adjust the tests for Windows

Bugfix #76524: Fix possible use after free for libzip 1.3.1

Bugfix #76524: Make the test independent of platform
2018-07-10 11:18:37 +02:00
Anatol Belski
e4a2cdb564 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed regex for checking libzip static lib
2018-07-07 17:33:47 +02:00
Dylan K. Taylor
77a841db48 Fixed regex for checking libzip static lib
This bug caused linking issues in debug mode (see bug [#76564](https://bugs.php.net/bug.php?id=76564))

This issue affects PHP 7.2 and master.
2018-07-07 17:32:16 +02:00
Dmitry Stogov
265c3ed6cf Fixed incorrrecr zval_dtor() usage to replace value of argument passed by reference, that may lead to memory leaks. 2018-07-05 10:57:49 +03:00
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Anatol Belski
7cdd732aca Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #76564 ext/zip link issues
2018-07-03 15:46:48 +02:00
Anatol Belski
e5ef7cbe87 Fixed bug #76564 ext/zip link issues
Add zlib for linking directly, so then ext/zlib is not required.
2018-07-03 15:45:01 +02:00
Peter Kokot
0bd3fecbcb Remove old SVN keywords substitutions from the zip tests 2018-06-16 12:36:00 +02:00
Remi Collet
25188727b1 Merge branch 'PHP-7.2'
* PHP-7.2:
  NEWS
  Add OPSYS_CPM constant as documented and to match libzip naming
2018-06-12 09:36:14 +02:00
Remi Collet
075e685439 Add OPSYS_CPM constant as documented and to match libzip naming 2018-06-12 09:31:41 +02:00
Dmitry Stogov
f2b4ec4bdc Export standard object handlers, to avoid indirect access 2018-05-31 11:57:22 +03: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
Anatol Belski
a8ec35ac38 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix shared ext/zip build with static dependency lib
2018-05-02 17:28:10 +02:00
Anatol Belski
afc3f6e8d5 Fix shared ext/zip build with static dependency lib 2018-05-02 17:26:37 +02:00
Dmitry Stogov
1af60a2a71 Keep initialized object_handlers structures in read-only memory. 2018-03-14 14:01:45 +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
b8bb4d77ca
Remove empty sections in tests 2018-02-14 11:10:59 +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
2238403892 Trailing whitespaces on ext/*
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-04 02:38:32 -02: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
Remi Collet
50e8ee128f Merge branch 'PHP-7.2'
* PHP-7.2:
  NEWS
  display headers (buildtime) and library (runtime) versions in phpinfo (libzip >= 1.3.1)
2017-12-19 14:48:21 +01:00
Remi Collet
c21ec44b21 display headers (buildtime) and library (runtime) versions in phpinfo (libzip >= 1.3.1) 2017-12-19 14:46:32 +01: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
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
6a9d2b2190 Cleanup type conversion 2017-12-07 19:24:55 +03: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