1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

2022 Commits

Author SHA1 Message Date
Gina Peter Banyard
320fe2975b core: Warn when coercing NAN to other types
RFC: https://wiki.php.net/rfc/warnings-php-8-5#coercing_nan_to_other_types

Closes GH-19573
2025-09-23 11:16:51 +01:00
sasezaki
78c997f36f Make ReflectionConstant non-final
Fixes GH-19747
Closes GH-19901
2025-09-22 19:52:59 +02:00
Gina Peter Banyard
4bc060c0f3 Update NEWS and UPGRADING for __wakeup() deprecation of date classes 2025-09-22 00:10:19 +01:00
Gina Peter Banyard
2a19375dd0 Update NEWS and UPGRADING for OOB floats to int casts 2025-09-21 23:56:27 +01:00
David CARLIER
a46be36091 ext/ldap: [RFC] Deprecate build with Oracle Instance Client version. (#19809) 2025-09-19 11:04:41 +01:00
Gina Peter Banyard
569b003327 Update NEWS/UPGRADING for ord() deprecation 2025-09-14 11:46:13 +01:00
tekimen
edc2671227 ext/mbstring: Update to Unicode 17.0 (#19796)
Updates UCD to Unicode 17.0 (released 2025 Sep).
2025-09-13 08:07:51 +09:00
Gina Peter Banyard
49fdf496e2 Update NEWS/UPGRADING for __wakeup()
Also add new line at the end of a test
2025-09-11 08:00:35 +02:00
Gina Peter Banyard
4191843f6a Update NEWS/UPGRADING for __sleep() deprecation 2025-09-10 09:56:49 +02:00
Tim Düsterhus
37bf0ec961 main: Deprecate deriving $_SERVER['argc'] and $_SERVER['argv'] from the query string (#19606)
* main: Ignore `register_argc_argv` when `SG(request_info).argc` is available

* sapi: Remove hardcoded `register_argc_argv` for CLI SAPIs

This INI is ignored since the previous commit, which makes the hardcoded
setting obsolete.

* main: Deprecate deriving $_SERVER['argc'] and $_SERVER['argv'] from the query string

RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_register_argc_argv_ini_directive

* main: Adjust deprecation message for `register_argc_argv`

* NEWS/UPGRADING
2025-09-09 10:34:35 +02:00
Calvin Buckley
cebe50a1af Remove driver specific support from ODBC (#15727)
* Purge most special cases for building ODBC with specific drivers

PDO_ODBC doesn't do this, and most of these drivers are not in use with
PHP, at least like this. Chances are these expose an ODBC driver you can
use with a normal driver manager like unixODBC or iODBC. If not, it can
be specified as a custom driver, though it does not include any
workarounds.

There might be some redundant definitions now as a result.

IBM Db2 is kept as a special case due to it also being in PDO_ODBC,
though I wonder how good of an idea this is.

See GH-15630

* Remove never used include

This would only be used on 68k classic Mac OS. Did PHP ever run there?

* Fold HAVE_SQL_EXTENDED_FETCH

All supported driver managers can do extended fetches.

* Ope, accidentally deleted this in a refactor

* All driver managers support SQLDataSources now too

So we don't need the define?

* Remove undef CHAR

There's no justification behind as to why this should be.

* Don't special case SQL_TIMESTAMP

The default handling for turning into SQL_C_CHAR is fine, and the
special case for Adabas is no longer needed.

* Assume fetch_hash is always possible

The driver managers and even Db2 support this.

This would also allow simplifying the fetch code to merge fetch_into and
fetch_array into a single implementation perhaps.

* Update UPGRADING for driver specific removal

* Update NEWS for driver specific removal
2025-09-09 00:07:15 -03:00
tekimen
ad75c26044 [RFC] Add a locale for grapheme case-insensitive functions (#18792)
* [RFC] Add a locale for grapheme case-insensitive functions

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2025-09-08 23:07:06 +09:00
David CARLIER
9f8802c416 ext/pdo_pgsql: [RFC] Deprecate PGSQL_TRANSACTION_ constants. (#19594) 2025-09-07 19:47:20 +01:00
Samuel Štancl
a09d919ce8 Implement GH-8967: Add PDO_SQLITE_ATTR_TRANSACTION_MODE (#19317)
This commit implements GH-8967.

SQLite supports multiple transaction modes. These include:
- DEFERRED (default) only acquires a lock when you start a read/write
- IMMEDIATE acquires a reserved lock
- EXCLUSIVE acquires an exclusive lock (stricter than immediate)

In WAL mode IMMEDIATE and EXCLUSIVE are identical.

One reason for wanting to specify a transaction mode is that SQLite
doesn't respect busy_timeout when a DEFERRED transaction tries to
upgrade a read lock to a write lock. Normally if you try to acquire a
lock and have busy_timeout configured, SQLite will wait for that period
until giving up and erroring out (SQLITE_BUSY). With DEFERRED, if you
have a transaction that first reads and there's a concurrent writer
while it's trying to upgrade to a write lock, you will immediately get
SQLITE_BUSY regardless of your busy_timeout.

Prior to this commit, the only available workarounds were:
- Using $pdo->exec("BEGIN IMMEDIATE TRANSACTION") instead of
  $pdo->beginTransaction()
- Doing a dummy write at the start of each transaction so you don't get
  stuck with a read lock

Both of those aren't very usable, especially in a framework context
where the user doesn't have complete control over how transactions are
started.

To address that, this commit adds four class constants to Pdo\Sqlite:
- ATTR_TRANSACTION_MODE -- a new attribute
- TRANSACTION_MODE_DEFERRED = 0
- TRANSACTION_MODE_IMMEDIATE = 1
- TRANSACTION_MODE_EXCLUSIVE = 2

These can be used as:
  $pdo->setAttribute(
    $pdo::ATTR_TRANSACTION_MODE,
    $pdo::TRANSACTION_MODE_IMMEDIATE
  );
2025-09-07 15:42:30 +02:00
Gina Peter Banyard
a13dc047ac Update NEWS and UPGRADING with entry for null as array offset 2025-09-04 23:19:01 +02:00
Alexandre Daubois
1c664e1c74 Remove mentions of PHP 9.0 2025-09-04 11:48:55 +02:00
Arnaud Le Blanc
a4afc57f1d Deprecate driver specific PDO methods
RFC: https://wiki.php.net/rfc/deprecations_php_8_5.

Closes GH-19596
2025-09-03 08:42:33 +02:00
benstone
7d5c8dad3b Add support for retrieving Exif from HEIF file
Signed-off-by: Benstone Zhang <benstonezhang@gmail.com>

Closes GH-13443
2025-09-01 20:54:36 +02:00
Gina Peter Banyard
34a0bcf103 Update NEWS/UPGRADING for destructing non-array values 2025-08-29 17:08:39 +02:00
Niels Dossche
84b78c047e Update pcre2lib from 10.45 to 10.46 (#19618)
There is a new release of pcre2lib to address a security issue [1].
It only affects version 10.45.
Only the master branch has version 10.45.

[1] https://github.com/PCRE2Project/pcre2/releases/tag/pcre2-10.46
2025-08-28 21:56:54 +02:00
Arnaud Le Blanc
6f32e1c690 Deprecate driver specific PDO constants
RFC: https://wiki.php.net/rfc/deprecations_php_8_5.

Closes GH-19526
2025-08-26 09:06:19 +02:00
Gina Peter Banyard
99068da2b1 Update NEWS/UPGRADING for $http_response_header deprecation 2025-08-25 23:46:11 +02:00
Gina Peter Banyard
e87767686c Core changes should be first and then other extension are alphabetical 2025-08-25 22:28:39 +02:00
Gina Peter Banyard
1c1f08c282 Update NEWS/UPGRADING for disable_classes removal 2025-08-25 22:27:17 +02:00
Alexandre Daubois
273d9e2901 [RFC] Deprecate closure binding issues (#19510)
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-24 00:10:18 -07:00
Gina Peter Banyard
f041c13c94 Update NEWS/UPGRADING for ++ on string deprecation 2025-08-23 15:40:15 +02:00
Arnaud Le Blanc
73b98a3858 TAILCALL VM
Introduce the TAILCALL VM, a more efficient variant of the CALL VM:

 * Each opcode handler tailcalls the next opcode handler directly instead of
   returning to the interpreter loop. This eliminates call and interpreter loop
   overhead.
 * Opcode handlers use the preserve_none calling convention to eliminate
   register saving overhead.
 * preserve_none uses non-volatile registers for its first arguments, so
   execute_data and opline are usually kept in these registers and no code is
   required to forward them to the next handlers.

Generated machine code is similar to a direct-threaded VM with register pinning,
like the HYBRID VM.

JIT+TAILCALL VM also benefits from this compared to JIT+CALL VM:

 * JIT uses the registers of the execute_data and opline args as fixed regs,
   eliminating the need to move them in prologue.
 * Traces exit by tailcalling the next handler. No code is needed to forward
   execute_data and opline.
 * No register saving/restoring in epilogue/prologue.

The TAILCALL VM is used when the HYBRID VM is not supported, and the compiler
supports the musttail and preserve_none attributes: The HYBRID VM is used when
compiling with GCC, the TAILCALL VM when compiling with Clang>=19 on x86_64 or
aarch64, and the CALL VM otherwise.

This makes binaries built with Clang>=19 as fast as binaries built with GCC.
Before, these were considerably slower (by 2.8% to 44% depending on benchmark,
and by 5% to 77% before 76d7c616bb).

Closes GH-17849
Closes GH-18720
2025-08-22 18:05:52 +02:00
Daniel Scherzer
63acc4bf61 [RFC] Add #[\DelayedTargetValidation] attribute (#18817)
https://wiki.php.net/rfc/delayedtargetvalidation_attribute
2025-08-20 00:41:20 -07:00
Alexandre Daubois
010fe2bb42 [RFC] Deprecate constant redeclaration (#19474)
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-16 09:54:37 -07:00
Daniel Scherzer
dbf0102b15 NEWS/UPGRADING for ArrayObject and ArrayIterator with objects deprecation 2025-08-16 08:45:40 -07:00
Alexandre Daubois
a84a82ed88 Deprecate disabling report_memleaks INI directive (#19481)
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_report_memleaks_ini_directive
2025-08-16 14:04:34 +02:00
Daniel Scherzer
7ca21d2e07 UPGRADING: Document NoDiscard new class [skip ci] (#19492) 2025-08-15 13:34:21 -07:00
Niels Dossche
1bba07ecc0 partitioned option for setcookie/setrawcookie and sessions
RFC: https://wiki.php.net/rfc/CHIPS

Closes GH-12646.
Closes GH-12652.
2025-08-15 08:41:24 +02:00
Gina Peter Banyard
f9d95c649e Update NEWS and UPGRADING for chr() deprecation 2025-08-14 20:51:30 +01:00
Calvin Buckley
60047025db Remove references to ODBCVER and assume ODBC 3.x (#19453)
* Remove references to ODBCVER and assume ODBC 3.x

See https://wiki.php.net/rfc/deprecations_php_8_5#remove_support_for_older_odbc_versions

* Avoid calling deprecated ODBC functions

`SQLGetConnectOption`, `SQLSetConnectOption` and `SQLSetStmtOption` are
deprecated, so if ODBC 3 is available, we use `SQLSetConnectAttr`,
`SQLGetConnectAttr`, and `SQLSetStmtAttr` instead.

(This is based on GH-17556, but just assumes ODBC 3.x.)

* Remove wrappers for SQLColAttribute

We don't need to support the old way of doing it.

* Just call SQLAllocHandle directly

Again, no need for the version specific wrapper

* Update NEWS for ODBCVER in beta2

* [skip ci] UPGRADING for ODBCVER changes

---------

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2025-08-12 18:05:43 -03:00
Niels Dossche
77dace78c3 [ci skip] Fix UPGRADING formatting 2025-08-12 22:35:47 +02:00
Jakub Zelenka
20c8c12d9e Fix #81724: openssl_cms_encrypt only allows specific ciphers
The allows cipher_algo to be specified as a string. It means the not
only predefined ID ciphers are available which means that also auth
enveloped data can be created using AES GCM.

Closes GH-19459
2025-08-12 15:52:09 +02:00
Jiří Pudil
38beb44176 [RFC] Extend #[\Override] to target properties (#19061)
RFC: https://wiki.php.net/rfc/override_properties

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2025-08-12 15:18:50 +02:00
Daniel Scherzer
c3bee21256 NEWS/UPGRADING for recent deprecations 2025-08-12 06:05:09 -07:00
Gina Peter Banyard
2b5d978a85 Update NEWS and UPGRADING 2025-08-12 11:53:37 +01:00
Tim Düsterhus
3d9d68e1ca zend_compile: Deprecate backticks as an alias for shell_exec() (#19443)
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_backticks_as_an_alias_for_shell_exec
2025-08-12 12:02:13 +02:00
Jakub Zelenka
10834d1572 Fix #47728: Add missing openssl constants
This adds PKCS7_NOSMIMECAP, PKCS7_CRLFEOL, PKCS7_NOCRL and
PKCS7_NO_DUAL_CONTENT constants. They might be potentially useful
in some scenarious.

Test is not added as it is not clear if there is much need for those and
it would require much bigger effort just to test OpenSSL functionality.

Closes GH-19450
2025-08-11 20:46:14 +02:00
Daniel Scherzer
6280dfc025 UPGRADING: document #[\Attribute] validation from GH-19154
[skip ci]
2025-08-11 09:17:06 -07:00
Theodore Brown
5f8d648af6 Deprecate terminating case statements with a semicolon (#19215)
Part of https://wiki.php.net/rfc/deprecations_php_8_5

Closes GH-15258
2025-08-11 14:18:06 +02:00
Tim Düsterhus
d01aa02ef5 UPGRADING: Fix formatting 2025-08-11 13:42:52 +02:00
Jakub Zelenka
702d18de99 Implement #80495: Enable to set padding in openssl_(sign|verify)
This adds support for RSA PSS padding.

Closes GH-19432
2025-08-11 13:11:10 +02:00
Gina Peter Banyard
e990b691c5 Update NEWS and UPGRADING for recent deprecation merges 2025-08-09 23:12:05 +01:00
Gina Peter Banyard
d65025b53d Update NEWS/UPGRADING for recent commits 2025-08-09 11:49:42 +01:00
Gina Peter Banyard
7b44bfd812 UPGRADING and NEWS for recent 8.5 deprecations 2025-08-08 21:45:02 +01:00
Frederik Milling Pytlick
4e21924271 Fix GH-17951: Addition of max_memory_limit INI
Closes GH-18011
2025-08-04 16:04:25 +02:00