Commit a870d214e62 for php

commit a870d214e6239724723bc524db54a8b35d8015ee
Merge: dea5c2fc839 268ebcbead3
Author: Tim Düsterhus <tim@tideways-gmbh.com>
Date:   Tue Nov 10 12:55:49 2026 +0100

    Merge branch 'PHP-8.5' into PHP-8.6

    * PHP-8.5:
      Fix argument number in sodium_crypto_stream_xchacha20_xor_ic() key length error (#25363)

diff --cc ext/sodium/tests/crypto_stream_xchacha20.phpt
index 0db0a4a487c,08d81b0ed18..110aa143c17
--- a/ext/sodium/tests/crypto_stream_xchacha20.phpt
+++ b/ext/sodium/tests/crypto_stream_xchacha20.phpt
@@@ -73,8 -73,13 +73,13 @@@ try
  try {
      sodium_crypto_stream_xchacha20_xor($stream, $nonce, substr($key, 1));
  } catch (SodiumException $ex) {
 -    echo $ex->getMessage(), "\n";
 +    echo $ex::class, ': ', $ex->getMessage(), "\n";
  }
+ try {
+     sodium_crypto_stream_xchacha20_xor_ic($stream, $nonce, 0, substr($key, 1));
+ } catch (Throwable $ex) {
+     echo $ex::class, ': ', $ex->getMessage(), "\n";
+ }

  ?>
  --EXPECT--
@@@ -89,8 -94,9 +94,9 @@@ bool(true
  bool(true)
  int(128)
  bool(true)
 -sodium_crypto_stream_xchacha20(): Argument #1 ($length) must be greater than 0
 -sodium_crypto_stream_xchacha20(): Argument #2 ($nonce) must be SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES bytes long
 -sodium_crypto_stream_xchacha20(): Argument #3 ($key) must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes long
 -sodium_crypto_stream_xchacha20_xor(): Argument #2 ($nonce) must be SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES bytes long
 -sodium_crypto_stream_xchacha20_xor(): Argument #3 ($key) must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes long
 +SodiumException: sodium_crypto_stream_xchacha20(): Argument #1 ($length) must be greater than 0
 +SodiumException: sodium_crypto_stream_xchacha20(): Argument #2 ($nonce) must be SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES bytes long
 +SodiumException: sodium_crypto_stream_xchacha20(): Argument #3 ($key) must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes long
 +SodiumException: sodium_crypto_stream_xchacha20_xor(): Argument #2 ($nonce) must be SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES bytes long
 +SodiumException: sodium_crypto_stream_xchacha20_xor(): Argument #3 ($key) must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes long
+ SodiumException: sodium_crypto_stream_xchacha20_xor_ic(): Argument #4 ($key) must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes long