From 34721745833b4c9e69ed22f1b17c4c1c421f7179 Mon Sep 17 00:00:00 2001 From: Juliette <663378+jrfnl@users.noreply.github.com> Date: Mon, 20 Oct 2025 01:32:32 +0200 Subject: [PATCH] PHP 8.5 | UPGRADING: add missing entries for FILTER_THROW_ON_FAILURE RFC (#20237) Looks like the changelog entry (and possibly NEWS too?) was missed completely for this RFC. Refs: * https://wiki.php.net/rfc/filter_throw_on_failure * https://github.com/php/php-src/commit/0b326dcbabe11e227f911bbde967b74fcada9e5a Co-authored-by: jrfnl --- UPGRADING | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/UPGRADING b/UPGRADING index 94ee9cacb9fea..e58d2875832fd 100644 --- a/UPGRADING +++ b/UPGRADING @@ -259,6 +259,13 @@ PHP 8.5 UPGRADE NOTES . Add OffsetTime* Exif tags. . Added support for HEIF/HEIC. +- Filter: + . Add new FILTER_THROW_ON_FAILURE flag which can be passed to the filter + functions and will force an exception to be triggered when validation fails. + The new flag cannot be combined with FILTER_NULL_ON_FAILURE; trying + to do so will result in a ValueError being thrown. + RFC: https://wiki.php.net/rfc/filter_throw_on_failure + - Intl: . Added class constants NumberFormatter::CURRENCY_ISO, NumberFormatter::CURRENCY_PLURAL, NumberFormatter::CASH_CURRENCY, @@ -807,6 +814,11 @@ PHP 8.5 UPGRADE NOTES across multiple PHP requests. RFC: https://wiki.php.net/rfc/curl_share_persistence_improvement +- Filter: + . Filter\FilterException and Filter\FilterFailedException for use + when FILTER_THROW_ON_FAILURE has been enabled. + RFC: https://wiki.php.net/rfc/filter_throw_on_failure + - URI: . Uri\UriException, Uri\InvalidUriException, Uri\UriComparisonMode, Uri\Rfc3986\Uri, Uri\WhatWg\InvalidUrlException, @@ -886,6 +898,9 @@ PHP 8.5 UPGRADE NOTES . CURLFOLLOW_OBEYCODE. . CURLFOLLOW_FIRSTONLY. +- Filter: + . FILTER_THROW_ON_FAILURE. + - Intl: . DECIMAL_COMPACT_SHORT. . DECIMAL_COMPACT_LONG.