1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Commit Graph

122447 Commits

Author SHA1 Message Date
Christoph M. Becker bbae3dd7ff Merge branch 'PHP-8.0'
* PHP-8.0:
  DateTime*::getOffset() no longer returns false as of PHP 8.0.0
2020-12-26 15:13:56 +01:00
Christoph M. Becker 269936e680 DateTime*::getOffset() no longer returns false as of PHP 8.0.0
Cf. <https://github.com/php/doc-en/pull/282>.

Closes GH-6539.
2020-12-26 15:13:05 +01:00
Tyson Andre 7edf034080 [skip ci] fix typo in NEWS 2020-12-25 12:27:17 -05:00
Dmitry Stogov 14b5fff632 Merge branch 'PHP-8.0'
* PHP-8.0:
  Eliminate redundand comparison insructions
2020-12-24 16:59:27 +03:00
Dmitry Stogov 23bbff2b05 Eliminate redundand comparison insructions 2020-12-24 16:58:54 +03:00
Máté Kocsis 5638fafa66 Merge branch 'PHP-8.0' 2020-12-24 11:46:10 +01:00
Máté Kocsis ab4c5976d7 Fix the signature of FFI::typeof() and FFI::memcmp() 2020-12-24 11:45:32 +01:00
Máté Kocsis c1d766171b Add a few other RETURN_THROWS() 2020-12-24 11:44:15 +01:00
Máté Kocsis ed19cb6518 Fix the signature of FFI::sizeof() and FFI::alignof() 2020-12-24 11:39:09 +01:00
Christopher Jones ec6f6dfcfc Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix PDO_OCI test
2020-12-24 17:48:53 +11:00
Christopher Jones 34aefa36f4 Fix PDO_OCI test 2020-12-24 17:48:39 +11:00
Christopher Jones e387e4da0e Fix PDO_OCI build 2020-12-24 17:18:57 +11:00
George Peter Banyard 4935fbe90f Update hash for IMAP stubs after adding final qualifier 2020-12-23 21:56:31 +01:00
Ayesh Karunaratne af68d4aae6 IMAP: Declare IMAPConnection class as final (stub+test)
Updates the `IMAPConnection` class stub to make sure it has the `final` flag, and adds a test to verify it.
2020-12-23 21:21:32 +01:00
Ayesh Karunaratne 7f1659afcb IMAP: Disallow direct new IMAPConnection() construct
Disallows constructing an `IMAPConnection` class directly with `new IMAPConnection` construct, by throwing an `Error` exception if attempted.
`imap_open` is still the only way to create `IMAPConnection` objects.
2020-12-23 21:21:32 +01:00
Christoph M. Becker 4050589302 Merge branch 'PHP-8.0'
* PHP-8.0:
  Add regression test for bug #76770
2020-12-23 16:47:32 +01:00
Semen Dubina 959d3c9636 Add regression test for bug #76770
Closes GH-3514.
2020-12-23 16:47:08 +01:00
Christoph M. Becker 89d4b6b790 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #80384: limit read buffer size
2020-12-23 13:53:19 +01:00
Christoph M. Becker 7d9ddd61ec Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80384: limit read buffer size
2020-12-23 13:52:45 +01:00
Adam Seitz 70dfbe0068 Fix #80384: limit read buffer size
In the case of a stream with no filters, php_stream_fill_read_buffer
only reads stream->chunk_size into the read buffer. If the stream has
filters attached, it could unnecessarily buffer a large amount of data.

With this change, php_stream_fill_read_buffer only proceeds until either
the requested size or stream->chunk_size is available in the read buffer.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-6444.
2020-12-23 13:49:56 +01:00
Nikita Popov 438b025a28 Support native types in PDO SQLite
Return integers and floats as native types if possible. As usual,
the old behavior can be restored by enabling ATTR_STRINGIFY_FETCHES.

Fixes bug #38334.
2020-12-23 11:25:31 +01:00
Ayesh Karunaratne 012439b78e FTP: Disallow direct FTPConnection construction
Similar to other resource to object migrations, `FTPConnection` class is not allowed to be constructed with `new FTPConnection`.
Related to b4503fbf88.

Closes GH-6533.
2020-12-23 09:54:38 +01:00
George Peter Banyard c6a8f201b1 EXPECTF imap_errors() test's authentication error 2020-12-22 23:14:11 +01:00
George Peter Banyard 7606994356 Make imap_errors() test no hang
Instead of attempting to connect with an invalid password, connect as an anonymous user.
As this is disabled in our Dovecot configuration, this generates an error, and fails fast.
2020-12-22 19:55:30 +01:00
George Peter Banyard a80a029896 Optimize Dovecot configuration for IMAP tests
Closes GH-6531
2020-12-22 19:55:30 +01:00
Nikita Popov caa710037e Rewrite PDO result binding
Instead of requiring the type to be determined in advance by the
describer function and then requiring get_col to return a buffer
of appropriate type, allow get_col to return an arbitrary zval.
See UPGRADING.INTERNALS for a more detailed description of the
change.

This makes the result fetching simpler, more efficient and more
flexible. The general possibility already existed via the special
PDO_PARAM_ZVAL type, but the usage was very inconvenient and/or
inefficient. Now it's possible to easily implement behavior like
"return int if it fits, otherwise string" and to avoid any kind
of complex management of temporary buffers.

This also fixes bug #40913 (our second highest voted bug of all
time, for some reason). PARAM_LOB result bindings will now
consistently return a stream resource, independently of the used
database driver.

I've tried my best to update all PDO drivers for this change, but
some of the changes may be broken, as I cannot test or even build
some of these drivers (in particular PDO dblib and PDO oci).
Fixes are appreciated -- a working CI setup would be even more
appreciated ;)
2020-12-22 15:56:34 +01:00
Nikita Popov 57d69b5137 Don't use explicitly nullable column in bug_73234.phpt
Firebird doesn't support this. It is nullable by default.

The test still fails, but now for a legitimate reason...
2020-12-22 10:34:54 +01:00
Nikita Popov b4ffe54174 Add CONFLICTS file for PDO firebird tests 2020-12-22 10:31:35 +01:00
Nikita Popov 381624818b Fix bug_69356.phpt for firebird
Firebird does not support selecting without a table. Use the same
code we use elsewhere, which adds "FROM DUAL" or "FROM RDS$DATABASE"
as necessary.
2020-12-22 10:26:07 +01:00
Nikita Popov 9294074c09 PDO Firebird: Use recreate table
Firebird does not have "if exists", and the switch to exception
error mode broke the suppressed exec calls.

Firebird does have a "recreate table" command that effective
perform a "drop table if exists" beforehand.
2020-12-22 10:20:41 +01:00
Nikita Popov a9253b0e22 Suppress zend_signals warnings if pdo_firebird loaded 2020-12-22 10:20:41 +01:00
George Peter Banyard 27afc455c3 Add IMAP resource to object conversion to UPGRADING 2020-12-22 03:09:00 +01:00
George Peter Banyard 383779e502 Convert IMAP resource to object
Closes GH-6418
2020-12-22 03:06:35 +01:00
Nikita Popov 694400616e Build PDO Firebird on Azure
Once again, this only builds the driver, all tests will be skipped.

Closes GH-6529.
2020-12-22 00:07:43 +01:00
Nikita Popov 26e0d389bc Show slow SKIPIF sections as well 2020-12-21 22:55:49 +01:00
Nikita Popov cc23fcfca6 PDO Firebird: Fix uninitialized var warning 2020-12-21 21:47:00 +01:00
Nikita Popov 0dfc4e7e41 Build PDO odbc on azure
We already install the necessary libs for the odbc extension, so
we may as well build PDO ODBC.

As we don't setup an ODBC server, the tests will be skipped.

Close GH-6528.
2020-12-21 18:37:45 +01:00
Nikita Popov 737195c3ae PDO: Honor ATTR_STRINGIFY_FETCHES for booleans
Of the important PDO drivers, this affects only PDO PgSQL, as
both MySQL and SQLite do not return native boolean types.
2020-12-21 15:32:32 +01:00
Derick Rethans 5a3c1f61d4 Merge branch 'PHP-8.0' into master 2020-12-21 10:32:17 +00:00
Derick Rethans 288332077f Fixed bug #80376 (last day of the month causes runway cpu usage) 2020-12-21 10:31:41 +00:00
Derick Rethans b043759cb4 Fixed bug #80376 (last day of the month causes runway cpu usage) 2020-12-21 10:30:40 +00:00
Nikita Popov 442fa318a0 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix bug #80537
2020-12-21 10:23:42 +01:00
Nikita Popov 27e250880b Fix bug #80537
This is an unavoidable breaking change to both the type and
parameter name.

The assertion that was supposed to prevent this was overly lax
and accepted any object type for string parameters.
2020-12-21 10:21:50 +01:00
Christopher Jones 4c5e47d113 Merge branch 'PHP-8.0'
* PHP-8.0:
  Description typo
2020-12-21 15:47:06 +11:00
Christopher Jones d6731d69bd Description typo 2020-12-21 15:46:26 +11:00
Christopher Jones 9af1ad7a95 Merge branch 'PHP-8.0'
* PHP-8.0:
  Bundle PECL OCI8 3.0.1
2020-12-21 15:38:35 +11:00
Christopher Jones 74959b47cd Bundle PECL OCI8 3.0.1 2020-12-21 15:15:16 +11:00
Christopher Jones f66888f94d Merge branch 'PHP-8.0'
* PHP-8.0:
  Retrofit NEWS
2020-12-21 15:08:40 +11:00
Christopher Jones 2877642037 Retrofit NEWS 2020-12-21 15:07:40 +11:00
Christoph M. Becker 78bdbfc24a Merge branch 'PHP-8.0'
* PHP-8.0:
  Revert "DateTime:: and DateTimeImmutable::getTimestamp() may return false"
2020-12-20 23:07:34 +01:00