Commit Graph

1169 Commits

Author SHA1 Message Date
Nikita Popov
dcc8463ae5 Deprecate IAP functions on objects
Deprecate use of key(), current(), next(), prev(), reset() and
end() on objects. Cast the object to array first.

Part of https://wiki.php.net/rfc/deprecations_php_8_1.
2021-07-08 15:28:33 +02:00
Nikita Popov
5bb83b3778 Deprecate date_sunrise() and date_sunset()
date_sunrise() and date_sunset() are deprecated in favor of
date_sun_info().

Part of https://wiki.php.net/rfc/deprecations_php_8_1.
2021-07-08 15:27:08 +02:00
Marco Pivetta
6e16e1daa9 Make ReflectionProperty/Method always accessible
With this patch, it is no longer required to call
`ReflectionProperty#setAccessible()` or
`ReflectionMethod#setAccessible()` with `true`.

If a userland consumer already got to the point of accessing
object/class information via reflection, it makes little sense
for `ext/reflection` to disallow accessing `private`/`protected`
symbols by default.

After this patch, calling `ReflectionProperty#setAccessible(true)`
or `ReflectionMethod#setAccessible(true)` on newly instantiated
`ReflectionProperty` or `ReflectionMethod` respectively will have
no effect.

RFC: https://wiki.php.net/rfc/make-reflection-setaccessible-no-op

Closes GH-5412.
2021-07-08 10:55:38 +02:00
Máté Kocsis
a5360e80c2
Add support for final class constants
RFC: https://wiki.php.net/rfc/final_class_const

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2021-07-06 21:42:38 +02:00
George Peter Banyard
069a9fa5e4
Pure Intersection types (#6799)
Implement pure intersection types RFC

RFC: https://wiki.php.net/rfc/pure-intersection-types

Co-authored-by: Nikita Popov <nikic@php.net>
Co-authored-by: Ilija Tovilo <ilutov@php.net>
2021-07-05 14:11:03 +02:00
Cameron Porter
b11785c5e4 Fixed bug #81085: Add version 7.71.0 blob options.
Adds support for the following options beginning with version 7.71.0:

    CURLOPT_ISSUERCERT_BLOB
    CURLOPT_PROXY_ISSUERCERT
    CURLOPT_PROXY_ISSUERCERT_BLOB
    CURLOPT_PROXY_SSLCERT_BLOB
    CURLOPT_PROXY_SSLKEY_BLOB
    CURLOPT_SSLCERT_BLOB
    CURLOPT_SSLKEY_BLOB

Closes GH-7194.
2021-06-28 09:54:45 +02:00
Juliette
fb70194850
UPGRADING: update information re: return type for internal methods (#7182)
As discussed in 7051.
2021-06-22 08:33:55 +02:00
Joe Watkins
ed88daecf4
missing news/upgrading entry 2021-06-18 11:25:36 +02:00
Nikita Popov
deb7955bf4 Fix #81150 Add UPGRADING note for float to int deprecation
[ci skip]
2021-06-17 09:52:44 +02:00
Nikita Popov
1c08f8a48a Allow named args after unpack
Currently, argument unpacking and named arguments cannot be mixed
at all. This relaxes the restriction to allow
foo(...$args, named: $arg). The variant foo(named: $arg, ...$args)
is still forbidden, because we can't ensure that positional
parameters come before named parameters in that case (without more
intrusive changes). Effectively this just enforces a required style,
as the order of unpack and named args doesn't matter for the cases
where both could be well-defined.

ML discussion: https://externals.io/message/114589

Closes GH-7009.
2021-06-14 10:32:36 +02:00
Nikita Popov
805471e86b Fix bug #81112: Implement JsonSerializable for SplFixedArray
This returns an array for SplFixedArray JSON encoding, which
is more appropriate than an object with integer string keys.

Closes GH-7117.
2021-06-14 10:07:45 +02:00
Joe Watkins
16d499ac55
Merge branch 'phpdbg-no-remote'
* phpdbg-no-remote:
  The remote functionality is not being used. It significantly complicates current code and makes it harder to add new features.

  This commit drops all remote related functionality.
2021-06-13 22:11:29 +02:00
deltragon
ae9f6e7a8f
Add IntlDatePatternGenerator (#6771)
Add IntlDatePatternGenerator class per RFC https://wiki.php.net/rfc/intldatetimepatterngenerator.
2021-06-10 12:36:38 +02:00
Ben Morss
81f6d36c90 Add avif support to ext/gd
This backports avif support from upstream libgd into bundled libgd
and exposes the functionality through new imagecreatefromavif()
and imageavif() functions.

Closes GH-7026.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-06-10 12:32:30 +02:00
David Carlier
fc147ed8db
sockets exposing TC_DEFER_ACCEPT to optimise tcp exchanges. 2021-06-09 06:54:02 +02:00
David Carlier
95a9e558b6
Pull #6989 FreeBSD defines SO_ACCEPTFILTER 2021-05-31 11:40:20 +02:00
David Carlier
28382aa1ec
pcntl: Adding pcntl_rfork support. 2021-05-31 09:19:15 +02:00
Máté Kocsis
01775fa104
Declare tentative return types for ext/mysqli (#6998) 2021-05-26 17:29:58 +02:00
Joe Watkins
4d883a0eba
note in upgrading for b227a72285 2021-05-21 16:05:56 +02:00
Máté Kocsis
532c60cb92
Add support for tentative return types of internal methods
RFC: https://wiki.php.net/rfc/internal_method_return_types

Closses GH-6971
2021-05-14 15:55:25 +02:00
Nikita Popov
959e5787bd Disable -a mode without readline
To avoid confusing, as -a without readline is not actually
interactive.

Discussion: https://externals.io/message/114426

Closes GH-6976.
2021-05-14 12:10:46 +02:00
Nikita Popov
6d5c60e945 Add UPGRADING/NEWS for full_path for file uploads
[ci skip]
2021-05-14 11:47:14 +02:00
Máté Kocsis
32aff25ceb
Convert resources to objects in ext/pgsql
Closes GH-6791

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2021-05-11 00:09:30 +02:00
Ayesh Karunaratne
57a635c655 Move resource-object classes of PSpell to \PSpell namespace
[namespaces in bundled extensions](https://wiki.php.net/rfc/namespaces_in_bundled_extensions) changes for PSpell.

 - Rename `PSpell` class to `\PSpell\Dictionary`
 - Rename `PSpellConfig` class to `\PSpell\Config`
 - Add entries to `UPGRADING` file.

Related: bd12c94f
2021-05-10 19:29:54 +02:00
Michael Voříšek
3ccc0409ce Remove no longer used "log_errors_max_len" ini directive (#6838)
This is a re-application of the original match against master.
The patch was originally applied to master, then reverted from
there, incorrectly applied to PHP-8.0, reverted from there due
to ABI break, and now lands on master again. We can only hope
that it does not get reverted again ;)
2021-05-10 19:26:33 +02:00
Ayesh Karunaratne
e0b947a8da
Move resource-object classes of LDAP to \LDAP namespaces (#6963)
Another change as per accepted [namespaces in bundled extensions RFC](https://wiki.php.net/rfc/namespaces_in_bundled_extensions).

Related: #6925, #5945, #6960
2021-05-09 22:20:21 +02:00
Ayesh Karunaratne
68224f2a41 Move FTP extension class FTPConnection to FTP\Connection
With the [namespaces in bundled extensions RFC](https://wiki.php.net/rfc/namespaces_in_bundled_extensions) passed, renaming the new `\FTPConnection` class to `\FTP\Connection`.
This also adds an entry to `./UPGRADING` file.

Related: #6925, #5945
2021-05-08 16:40:10 +02:00
P.I.E. Security Team
9b794f8e5e
Expose libsodium's Ristretto255 API (#6922) 2021-05-07 17:43:00 -05:00
Ben Ramsey
01ce8d3a78
Add entries for new behavior of PDO_ODBC server info/version attributes 2021-05-07 16:41:26 -05:00
Ayesh Karunaratne
251da73a9a [skip-ci] Update UPGRADING file with new IMAP namespace
Followed by the bundled extension namespace RFC, #6925 updated the `IMAPConnection` class to `IMAP\Connection`.

This updates the UPGRADING file to reflect that change.
2021-05-06 20:57:56 +01:00
Kamil Tekiela
54222a6fe4
Implement mysqli_fetch_column (#6798)
* Implement mysqli_fetch_column
2021-05-01 20:11:47 +01:00
Nikita Popov
9a1da9f61f Don't use separate static variables in inherited methods
RFC: https://wiki.php.net/rfc/static_variable_inheritance

Closes GH-6719.
2021-04-28 17:08:50 +02:00
Nikita Popov
3e6b447979 Partially deprecate Serializable
If Serializable is implemented, require that __serialize() and
__unserialize() are implemented as well, else issue a deprecation
warning.

Also deprecate use of PDO::FETCH_SERIALIZE.

RFC: https://wiki.php.net/rfc/phase_out_serializable

Closes GH-6494.
2021-04-28 16:55:14 +02:00
Aaron Piotrowski
c276c16b66
Implement Fibers
RFC: https://wiki.php.net/rfc/fibers

Closes GH-6875.
2021-04-26 11:07:06 -05:00
Matt Brown
6cd0b48cac Implement never return type
The never type can be used to indicate that a function never
returns, for example because it always unwinds.

RFC: https://wiki.php.net/rfc/noreturn_type

Closes GH-6761.
2021-04-19 11:27:29 +02:00
Kamil Tekiela
45bad6474e
Mysqli bind in execute (#6271) 2021-04-14 12:52:51 +01:00
David Gebler
cbcfd86026 Add fsync() and fdatasync() functions
fsync is a straightforward wrapper around the same C function
(implemented on Windows API as _commit() with identical signature).

From the man pages:

    fsync() transfers ("flushes") all modified in-core data of (i.e.,
    modified buffer cache pages for) the file referred to by the file
    descriptor fd to the disk device (or other permanent storage
    device) so that all changed information can be retrieved even if
    the system crashes or is rebooted.  This includes writing through
    or flushing a disk cache if present.  The call blocks until the
    device reports that the transfer has completed.

RFC: https://wiki.php.net/rfc/fsync_function

Closes GH-6650.
2021-04-13 16:09:22 +02:00
Josh Soref
462da6e09c Fix spelling and grammar mistakes
This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

The action reports that the changes in this PR would make it happy: jsoref@602417c

Closes GH-6822.
2021-04-13 12:09:37 +02:00
George Peter Banyard
caaf2e9981 [skip-ci] Update UPGRADING documents for the new argument for fputcsv() 2021-03-29 13:55:18 +01:00
Jakub Zelenka
4ed4b64df8 Update NEWS and UPGRADING for FPM addition of pm.max_spawn_rate 2021-03-28 21:15:35 +01:00
Jakub Zelenka
661731d4f1 Upadate NEWS and UPRADING with info about FPM openmetrics format addition 2021-03-21 18:32:19 +00:00
Máté Kocsis
cd40fc3cb1
Convert resources to objects in ext/ldap
Closes GH-6770
2021-03-21 10:43:25 +01:00
Dharman
7e9f6d2a48 Deprecate OO style mysqli::get_client_info method
Deprecate passing connection object to mysqli_get_client_info()

Closes GH-6777.
2021-03-17 20:10:18 +00:00
Ilija Tovilo
d628d7e015
Add enums to UPGRADING [ci skip] 2021-03-17 19:15:35 +01:00
Dharman
5e1056edb6 Change the default error mode of mysqli
Make MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT the new mysqli
error reporting default. Explicitly call
mysqli_report(MYSQLI_REPORT_OFF) to preserve previous behavior.

RFC: https://wiki.php.net/rfc/mysqli_default_errmode

Closes GH-6629.
2021-03-15 14:55:31 +01:00
Dharman
3dfd3558ca Deprecate mysqli driver_version property
The driver version hasn't been updated in 13 years, so this number
is essentially meaningless. Check PHP_VERSION_ID instead.
2021-03-15 10:48:36 +01:00
Dmitry Stogov
b84f4ed7c3 typo 2021-03-05 12:31:04 +03:00
Nikita Popov
500b4b4945 Explicitly print reference wrappers in debug_zval_dump()
Closes GH-6750.
2021-03-04 10:11:37 +01:00
Dmitry Stogov
c9a9362c78 Added UPGRADING note. 2021-03-01 13:42:34 +03:00
Darek Slusarczyk
da011a312a Fix #80329: Add option to specify LOAD DATA LOCAL white list folder
* allow the user to specify a folder where files that can be sent
   via LOAD DATA LOCAL can exist
 * add mysqli.local_infile_directory for mysqli
   (ignored if mysqli.allow_local_infile is enabled)
 * add PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY for pdo_mysql
   (ignored if PDO::MYSQL_ATTR_LOCAL_INFILE is enabled)
 * add related tests
 * fixes for building with libmysql 8.x
 * small improvement in existing tests
 * update php.ini-[development|production] files

Closes GH-6448.

Co-authored-by: Nikita Popov <nikic@php.net>
2021-02-23 09:30:46 +01:00