1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Commit Graph

667 Commits

Author SHA1 Message Date
Christoph M. Becker 99c57b33cf Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace deprecated libzip functions
2019-08-26 14:06:08 +02:00
Christoph M. Becker 8f897f1040 Replace deprecated libzip functions
We replace all deprecated libzip functions with their recommended
substitutes, and add proper comment length checks including a test
case.
2019-08-26 14:05:28 +02:00
Christoph M. Becker e7ac9428d8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove dead code
2019-08-13 13:29:35 +02:00
Christoph M. Becker eb25176ab3 Remove dead code 2019-08-13 13:29:11 +02:00
Stephen Reay d4e5e63b6c Added zip arginfo stubs 2019-08-13 13:01:51 +02:00
Nikita Popov d37d418927 Merge branch 'PHP-7.4' 2019-07-23 11:28:10 +02:00
George Peter Banyard 6d6d954d0d Cleanup of remaining E_STRICT in tests 2019-07-23 11:27:23 +02:00
Nikita Popov a1e2c8870e Merge branch 'PHP-7.4' 2019-07-22 17:26:01 +02:00
Nikita Popov d59aac58b3 Report errors from stream read and write operations
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.

As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).

I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
2019-07-22 17:17:28 +02:00
Peter Kokot 00821b807c Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove HAVE_LIBZIP
2019-07-21 11:32:53 +02:00
Peter Kokot 15782b27b8 Remove HAVE_LIBZIP
The libzip library is now always used from the system.

Closes GH-4450
2019-07-21 11:32:13 +02:00
Nikita Popov bd38129fa4 Merge branch 'PHP-7.4' 2019-07-16 10:25:14 +02:00
Nikita Popov e2e3ddac7d Canonicalize file-names in zip tests
There were a number of name collisions in there.
2019-07-16 10:25:06 +02:00
twosee 63171d88f2 Add do...while(0) for RETURN_* and ZVAL_* APIs
Closes GH-4255.
2019-06-12 16:17:16 +02:00
Joe Watkins 3926fa44a6 Merge branch 'PHP-7.4'
* PHP-7.4:
  fix flaky zip tests, order is OS dependent
2019-06-12 09:48:09 +02:00
Joe Watkins e2eb1ee1e3 fix flaky zip tests, order is OS dependent 2019-06-12 09:47:47 +02:00
Nikita Popov 3820296c42 Merge branch 'PHP-7.4' 2019-06-06 11:48:54 +02:00
Nikita Popov 3372f2cf2c php_zip_pcre: Match pattern before stating for directories
For two reasons: First, it's generally cheaper to match a regex than
perform a stat (especially on Windows). Second, it will not fail on
concurrent modification of a directory in parts that are not matched
by the pattern, such as the spurious failure in ext/zip/tests/bug72660.phpt.
2019-06-06 11:46:23 +02:00
Dmitry Stogov 457392fa64 Cheaper checks for exceptions thrown from __toString() 2019-06-06 01:47:22 +03: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
Nikita Popov 623eedbbd5 Merge branch 'PHP-7.4' 2019-06-04 16:14:46 +02:00
Hugh McMaster c9830f1c2c ext/zip: Replace $LIBZIP_LIBDIR with $LIBZIP_LIBS
Closes GH-4220.
2019-06-04 15:31:35 +02:00
Nikita Popov b1e52cab62 Merge branch 'PHP-7.4' 2019-06-03 09:21:13 +02:00
Hugh McMaster f349d790b4 ext/zip: Remove un-needed symbol check for zip_open
Closes GH-4189.
2019-06-03 09:20:31 +02:00
Hugh McMaster 310f96fd13 ext/zip: Add PHP_EVAL_LIBLINE to replace PHP_ADD_LIBRARY_WITH_PATH 2019-06-03 09:20:12 +02:00
Nikita Popov 1df8175b61 Convert fetch_resource warnings into TypeErrors
More type checks that are not part of zpp and should generate a
TypeError in PHP 8.
2019-06-03 09:17:12 +02:00
Nikita Popov cf599e56ad Merge branch 'PHP-7.4' 2019-05-27 17:44:55 +02:00
Nikita Popov adec208bdb Merge branch 'PHP-7.3' into PHP-7.4 2019-05-27 17:44:11 +02:00
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 2cf90bb2f0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Normalize comments in *nix build system m4 files
2019-05-12 18:51:50 +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 0d8eb57980 Merge branch 'PHP-7.4' 2019-04-29 14:18:07 +02:00
Hugh McMaster a7b5b341b3 Use PKG_CHECK_MODULES to detect the zip library 2019-04-29 14:16:16 +02:00
Hugh McMaster c9ee822bb6 Always use pkg-config from the host architecture 2019-04-29 14:16:16 +02:00
Dmitry Stogov e188e4170f Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference 2019-04-24 18:28:29 +03:00
Dmitry Stogov 2e4686b566 Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference 2019-04-24 18:16:47 +03:00
Dmitry Stogov 34db07567d Use ZEND_TRA_ASSIGN_REF_... macros for by reference arguments of internal functions. 2019-04-24 16:14:48 +03:00
Gabriel Caruso 12446aafce Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove HAVE_* for always available extensions
2019-04-14 11:51:39 -03:00
Gabriel Caruso 656db96eb9 Remove HAVE_* for always available extensions 2019-04-14 11:44:12 -03:00
Christoph M. Becker 7ad6e1d7de Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove unused variables
2019-03-17 23:32:53 +01:00
Fabien Villepinte b6f9ade9f2 Remove unused variables 2019-03-17 23:29:51 +01:00
Peter Kokot 6426420f61 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 23:36:47 +01:00
Fabien Villepinte 26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Nikita Popov 852485d8ec Adjust tests for zpp TypeError change 2019-03-11 11:32:20 +01:00
Peter Kokot f4a12d198b Merge branch 'PHP-7.4'
* PHP-7.4:
  Add meaningful error message for ext/zip
2019-03-11 00:16:36 +01:00
hassan 173e126a77 Add meaningful error message for ext/zip 2019-03-11 00:15:29 +01:00
Peter Kokot d0fd9fe977 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add AS_HELP_STRING to *nix build configure options
2019-03-07 20:38:04 +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 4dac02813d Merge branch 'PHP-7.4' 2019-02-21 12:23:08 +01:00