Skip to content

Commit 6b89dbc

Browse files
committed
Remove FILTER_FLAG_(SCHEME|HOST)_REQUIRED
Deprecated in PHP 7.3 as part of https://wiki.php.net/rfc/deprecations_php_7_3.
1 parent d74d392 commit 6b89dbc

File tree

4 files changed

+5
-26
lines changed

4 files changed

+5
-26
lines changed

UPGRADING

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ PHP 8.0 UPGRADE NOTES
2727
. Removed create_function(). Anonymous functions may be used instead.
2828
. Removed each(). foreach or ArrayIterator should be used instead.
2929

30+
- Filter:
31+
. The FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED flags for the
32+
FILTER_VALIDATE_URL filter have been removed. The scheme and host are (and
33+
have been) always required.
34+
3035
- GD:
3136
. The deprecated function image2wbmp() has been removed.
3237
RFC: https://wiki.php.net/rfc/image2wbmp

ext/filter/filter.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,6 @@ PHP_MINIT_FUNCTION(filter)
276276
REGISTER_LONG_CONSTANT("FILTER_FLAG_ALLOW_THOUSAND", FILTER_FLAG_ALLOW_THOUSAND, CONST_CS | CONST_PERSISTENT);
277277
REGISTER_LONG_CONSTANT("FILTER_FLAG_ALLOW_SCIENTIFIC", FILTER_FLAG_ALLOW_SCIENTIFIC, CONST_CS | CONST_PERSISTENT);
278278

279-
REGISTER_LONG_CONSTANT("FILTER_FLAG_SCHEME_REQUIRED", FILTER_FLAG_SCHEME_REQUIRED, CONST_CS | CONST_PERSISTENT);
280-
REGISTER_LONG_CONSTANT("FILTER_FLAG_HOST_REQUIRED", FILTER_FLAG_HOST_REQUIRED, CONST_CS | CONST_PERSISTENT);
281279
REGISTER_LONG_CONSTANT("FILTER_FLAG_PATH_REQUIRED", FILTER_FLAG_PATH_REQUIRED, CONST_CS | CONST_PERSISTENT);
282280
REGISTER_LONG_CONSTANT("FILTER_FLAG_QUERY_REQUIRED", FILTER_FLAG_QUERY_REQUIRED, CONST_CS | CONST_PERSISTENT);
283281

ext/filter/logical_filters.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -537,11 +537,6 @@ void php_filter_validate_url(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
537537
php_url *url;
538538
size_t old_len = Z_STRLEN_P(value);
539539

540-
if (flags & (FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED)) {
541-
php_error_docref(NULL, E_DEPRECATED,
542-
"explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated");
543-
}
544-
545540
php_filter_url(value, flags, option_array, charset);
546541

547542
if (Z_TYPE_P(value) != IS_STRING || old_len != Z_STRLEN_P(value)) {

ext/filter/tests/deprecated.phpt

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)