From 18249615f9de677cc0836555658193b5124484c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 17 Aug 2020 09:49:22 +0200 Subject: [PATCH] Improve ArgumentCountError error message --- Zend/tests/bug46106.phpt | 2 +- Zend/tests/bug51827.phpt | 2 +- .../argument_count_incorrect_internal.phpt | 2 +- ...ument_count_incorrect_internal_strict.phpt | 2 +- Zend/zend_API.c | 40 +++++++++---------- .../tests/DateTimeZone_construct_error.phpt | 2 +- ext/date/tests/DateTime_construct_error.phpt | 2 +- ext/date/tests/mktime_error.phpt | 4 +- .../tests/DOMAttr_construct_error_001.phpt | 2 +- .../DOMCDATASection_construct_error_001.phpt | 2 +- .../tests/DOMComment_construct_error_001.phpt | 2 +- ext/fileinfo/tests/bug61173.phpt | 2 +- .../tests/breakiter___construct_error.phpt | 4 +- .../tests/calendar_before_after_error.phpt | 12 +++--- ext/intl/tests/calendar_equals_error.phpt | 4 +- .../tests/calendar_fieldDifference_error.phpt | 4 +- ext/intl/tests/calendar_getLocale_error.phpt | 2 +- ...r_get_getActualMaximum_Minumum_error2.phpt | 12 +++--- .../tests/calendar_isEquivalentTo_error.phpt | 4 +- .../tests/calendar_setTimeZone_error.phpt | 6 +-- ext/intl/tests/calendar_setTime_error.phpt | 2 +- ext/intl/tests/calendar_set_error.phpt | 2 +- ext/intl/tests/formatter_fail.phpt | 6 +-- ext/intl/tests/msgfmt_fail2.phpt | 12 +++--- ext/mysqli/tests/mysqli_fetch_object_oo.phpt | 2 +- ext/phar/tests/002.phpt | 2 +- ext/phar/tests/badparameters.phpt | 8 ++-- ext/phar/tests/bug60261.phpt | 2 +- .../ReflectionClass_constructor_002.phpt | 4 +- .../tests/ReflectionClass_getMethod_002.phpt | 4 +- .../ReflectionClass_getProperty_002.phpt | 4 +- ...ctionClass_getStaticPropertyValue_002.phpt | 4 +- ...flectionClass_implementsInterface_001.phpt | 4 +- .../ReflectionClass_isSubclassOf_002.phpt | 4 +- ...ctionClass_setStaticPropertyValue_002.phpt | 6 +-- ...ReflectionExtension_constructor_error.phpt | 6 +-- .../ReflectionFunction_construct.001.phpt | 4 +- .../tests/ReflectionMethod_006.phpt | 4 +- .../ReflectionMethod_constructor_error2.phpt | 6 +-- .../tests/ReflectionMethod_invoke_basic.phpt | 2 +- .../ReflectionObject_isSubclassOf.002.phpt | 4 +- ...nParameter_invalidMethodInConstructor.phpt | 2 +- .../tests/ReflectionProperty_error.phpt | 6 +-- .../ReflectionProperty_getValue_error.phpt | 2 +- .../session_set_save_handler_class_012.phpt | 2 +- ext/soap/tests/bugs/bug31422.phpt | 2 +- ext/sockets/tests/socket_connect_params.phpt | 2 +- ext/sodium/tests/bug78114.phpt | 2 +- .../tests/CallbackFilterIteratorTest-002.phpt | 4 +- .../tests/arrayObject___construct_error2.phpt | 2 +- .../arrayObject_exchangeArray_basic3.phpt | 2 +- ext/spl/tests/arrayObject_uasort_error1.phpt | 4 +- ext/spl/tests/arrayObject_uksort_error1.phpt | 4 +- ext/spl/tests/iterator_056.phpt | 12 +++--- ext/spl/tests/iterator_062.phpt | 2 +- .../tests/recursive_tree_iterator_002.phpt | 2 +- ext/spl/tests/spl_004.phpt | 2 +- .../spl_iterator_iterator_constructor.phpt | 2 +- ext/sqlite3/tests/sqlite3_02_open.phpt | 2 +- .../tests/array/array_filter_variation10.phpt | 2 +- ext/standard/tests/array/array_map_error.phpt | 2 +- .../tests/array/array_map_variation12.phpt | 2 +- .../tests/array/array_walk_error2.phpt | 2 +- .../array/array_walk_recursive_error2.phpt | 2 +- .../tests/password/password_hash_error.phpt | 2 +- .../password/password_needs_rehash_error.phpt | 2 +- .../tests/password/password_verify_error.phpt | 2 +- .../tests/random/random_bytes_error.phpt | 2 +- .../tests/random/random_int_error.phpt | 4 +- ext/standard/tests/strings/chr_error.phpt | 4 +- ext/standard/tests/strings/fprintf_error.phpt | 6 +-- ext/standard/tests/strings/printf_64bit.phpt | 2 +- ext/standard/tests/strings/printf_error.phpt | 2 +- ext/standard/tests/strings/sprintf_error.phpt | 4 +- .../tests/strings/vfprintf_error1.phpt | 4 +- tests/output/ob_014.phpt | 2 +- tests/output/ob_015.phpt | 2 +- 77 files changed, 154 insertions(+), 154 deletions(-) diff --git a/Zend/tests/bug46106.phpt b/Zend/tests/bug46106.phpt index 525c4df6c5d96..a8658cb295e5d 100644 --- a/Zend/tests/bug46106.phpt +++ b/Zend/tests/bug46106.phpt @@ -23,5 +23,5 @@ try { ?> DONE --EXPECT-- -str_pad() expects at least 2 parameters, 1 given +str_pad(): At least 2 arguments are expected, 1 given DONE diff --git a/Zend/tests/bug51827.phpt b/Zend/tests/bug51827.phpt index 1a2d9bdf39ca4..79b17c6773771 100644 --- a/Zend/tests/bug51827.phpt +++ b/Zend/tests/bug51827.phpt @@ -16,7 +16,7 @@ register_shutdown_function('exploDe'); --EXPECT-- int(1) -Fatal error: Uncaught ArgumentCountError: explode() expects at least 2 parameters, 0 given in [no active file]:0 +Fatal error: Uncaught ArgumentCountError: explode(): At least 2 arguments are expected, 0 given in [no active file]:0 Stack trace: #0 [internal function]: explode() #1 {main} diff --git a/Zend/tests/function_arguments/argument_count_incorrect_internal.phpt b/Zend/tests/function_arguments/argument_count_incorrect_internal.phpt index 5d5235888f39e..16f9a7e65b63d 100644 --- a/Zend/tests/function_arguments/argument_count_incorrect_internal.phpt +++ b/Zend/tests/function_arguments/argument_count_incorrect_internal.phpt @@ -9,4 +9,4 @@ try { } ?> --EXPECT-- -substr() expects at least 2 parameters, 1 given +substr(): At least 2 arguments are expected, 1 given diff --git a/Zend/tests/function_arguments/argument_count_incorrect_internal_strict.phpt b/Zend/tests/function_arguments/argument_count_incorrect_internal_strict.phpt index 66b651737915d..e77fc74c5d365 100644 --- a/Zend/tests/function_arguments/argument_count_incorrect_internal_strict.phpt +++ b/Zend/tests/function_arguments/argument_count_incorrect_internal_strict.phpt @@ -19,6 +19,6 @@ try { ?> --EXPECT-- ArgumentCountError -substr() expects at least 2 parameters, 1 given +substr(): At least 2 arguments are expected, 1 given ArgumentCountError At least 2 parameters are required, 1 given diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 824529d587096..a1b420c7ad974 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -198,18 +198,18 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_none_error(void) /* ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(uint32_t min_num_args, uint32_t max_num_args) /* {{{ */ { uint32_t num_args = ZEND_CALL_NUM_ARGS(EG(current_execute_data)); - zend_function *active_function = EG(current_execute_data)->func; - const char *class_name = active_function->common.scope ? ZSTR_VAL(active_function->common.scope->name) : ""; + char *func_name = get_active_function_or_method_name(); zend_argument_count_error( - "%s%s%s() expects %s %d parameter%s, %d given", - class_name, \ - class_name[0] ? "::" : "", \ - ZSTR_VAL(active_function->common.function_name), - min_num_args == max_num_args ? "exactly" : num_args < min_num_args ? "at least" : "at most", - num_args < min_num_args ? min_num_args : max_num_args, - (num_args < min_num_args ? min_num_args : max_num_args) == 1 ? "" : "s", - num_args); + "%s(): %s %d argument%s %s expected, %d given", + func_name, min_num_args == max_num_args ? "Exactly" : num_args < min_num_args ? "At least" : "At most", + num_args < min_num_args ? min_num_args : max_num_args, + (num_args < min_num_args ? min_num_args : max_num_args) == 1 ? "" : "s", + (num_args < min_num_args ? min_num_args : max_num_args) == 1 ? "is" : "are", + num_args + ); + + efree(func_name); } /* }}} */ @@ -991,16 +991,16 @@ static zend_result zend_parse_va_args(uint32_t num_args, const char *type_spec, if (num_args < min_num_args || num_args > max_num_args) { if (!(flags & ZEND_PARSE_PARAMS_QUIET)) { - zend_function *active_function = EG(current_execute_data)->func; - const char *class_name = active_function->common.scope ? ZSTR_VAL(active_function->common.scope->name) : ""; - zend_argument_count_error("%s%s%s() expects %s %d parameter%s, %d given", - class_name, - class_name[0] ? "::" : "", - ZSTR_VAL(active_function->common.function_name), - min_num_args == max_num_args ? "exactly" : num_args < min_num_args ? "at least" : "at most", - num_args < min_num_args ? min_num_args : max_num_args, - (num_args < min_num_args ? min_num_args : max_num_args) == 1 ? "" : "s", - num_args); + char *func_name = get_active_function_or_method_name(); + zend_argument_count_error("%s(): %s %d argument%s %s expected, %d given", + func_name, min_num_args == max_num_args ? "Exactly" : num_args < min_num_args ? "At least" : "At most", + num_args < min_num_args ? min_num_args : max_num_args, + (num_args < min_num_args ? min_num_args : max_num_args) == 1 ? "" : "s", + (num_args < min_num_args ? min_num_args : max_num_args) == 1 ? "is" : "are", + num_args + ); + + efree(func_name); } return FAILURE; } diff --git a/ext/date/tests/DateTimeZone_construct_error.phpt b/ext/date/tests/DateTimeZone_construct_error.phpt index 00142dbe3a1f6..711349ff5748e 100644 --- a/ext/date/tests/DateTimeZone_construct_error.phpt +++ b/ext/date/tests/DateTimeZone_construct_error.phpt @@ -21,4 +21,4 @@ try { *** Testing DateTimeZone() : error conditions *** -- Testing new DateTimeZone() with more than expected no. of arguments -- -DateTimeZone::__construct() expects exactly 1 parameter, 2 given +DateTimeZone::__construct(): Exactly 1 argument is expected, 2 given diff --git a/ext/date/tests/DateTime_construct_error.phpt b/ext/date/tests/DateTime_construct_error.phpt index b033eadaeb530..16cf16216d290 100644 --- a/ext/date/tests/DateTime_construct_error.phpt +++ b/ext/date/tests/DateTime_construct_error.phpt @@ -22,4 +22,4 @@ try { *** Testing date_create() : error conditions *** -- Testing new DateTime() with more than expected no. of arguments -- -DateTime::__construct() expects at most 2 parameters, 3 given +DateTime::__construct(): At most 2 arguments are expected, 3 given diff --git a/ext/date/tests/mktime_error.phpt b/ext/date/tests/mktime_error.phpt index f7cc4565bebef..e567838c499fa 100644 --- a/ext/date/tests/mktime_error.phpt +++ b/ext/date/tests/mktime_error.phpt @@ -33,7 +33,7 @@ try { *** Testing mktime() : error conditions *** -- Testing mktime() function with Zero arguments -- -mktime() expects at least 1 parameter, 0 given +mktime(): At least 1 argument is expected, 0 given -- Testing mktime() function with more than expected no. of arguments -- -mktime() expects at most 6 parameters, 7 given +mktime(): At most 6 arguments are expected, 7 given diff --git a/ext/dom/tests/DOMAttr_construct_error_001.phpt b/ext/dom/tests/DOMAttr_construct_error_001.phpt index fbe2512c1d6ab..3540862c31ad0 100644 --- a/ext/dom/tests/DOMAttr_construct_error_001.phpt +++ b/ext/dom/tests/DOMAttr_construct_error_001.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -DOMAttr::__construct() expects at least 1 parameter, 0 given +DOMAttr::__construct(): At least 1 argument is expected, 0 given diff --git a/ext/dom/tests/DOMCDATASection_construct_error_001.phpt b/ext/dom/tests/DOMCDATASection_construct_error_001.phpt index ab7149cd879d0..61a63745de42e 100644 --- a/ext/dom/tests/DOMCDATASection_construct_error_001.phpt +++ b/ext/dom/tests/DOMCDATASection_construct_error_001.phpt @@ -14,4 +14,4 @@ Nic Rosental nicrosental@gmail.com } ?> --EXPECT-- -DOMCdataSection::__construct() expects exactly 1 parameter, 0 given +DOMCdataSection::__construct(): Exactly 1 argument is expected, 0 given diff --git a/ext/dom/tests/DOMComment_construct_error_001.phpt b/ext/dom/tests/DOMComment_construct_error_001.phpt index e02c2a97a2395..9f508429a9b59 100644 --- a/ext/dom/tests/DOMComment_construct_error_001.phpt +++ b/ext/dom/tests/DOMComment_construct_error_001.phpt @@ -14,4 +14,4 @@ try { } ?> --EXPECT-- -DOMComment::__construct() expects at most 1 parameter, 2 given +DOMComment::__construct(): At most 1 argument is expected, 2 given diff --git a/ext/fileinfo/tests/bug61173.phpt b/ext/fileinfo/tests/bug61173.phpt index 10277ba608194..6f6e8177961e0 100644 --- a/ext/fileinfo/tests/bug61173.phpt +++ b/ext/fileinfo/tests/bug61173.phpt @@ -15,4 +15,4 @@ try { } ?> --EXPECT-- -finfo::__construct() expects at most 2 parameters, 3 given +finfo::__construct(): At most 2 arguments are expected, 3 given diff --git a/ext/intl/tests/breakiter___construct_error.phpt b/ext/intl/tests/breakiter___construct_error.phpt index 7272d8c16b71c..f8ddadb53740b 100644 --- a/ext/intl/tests/breakiter___construct_error.phpt +++ b/ext/intl/tests/breakiter___construct_error.phpt @@ -46,9 +46,9 @@ try { --EXPECTF-- Exception: IntlRuleBasedBreakIterator::__construct(): unable to create RuleBasedBreakIterator from rules (parse error on line 1, offset 31) in %s on line %d -Exception: IntlRuleBasedBreakIterator::__construct() expects at least 1 parameter, 0 given in %s on line %d +Exception: IntlRuleBasedBreakIterator::__construct(): At least 1 argument is expected, 0 given in %s on line %d -Exception: IntlRuleBasedBreakIterator::__construct() expects at most 2 parameters, 3 given in %s on line %d +Exception: IntlRuleBasedBreakIterator::__construct(): At most 2 arguments are expected, 3 given in %s on line %d Exception: IntlRuleBasedBreakIterator::__construct(): Argument #2 ($areCompiled) must be of type bool, array given in %s on line %d diff --git a/ext/intl/tests/calendar_before_after_error.phpt b/ext/intl/tests/calendar_before_after_error.phpt index be1f01b9279bb..c0bd8a61bb75d 100644 --- a/ext/intl/tests/calendar_before_after_error.phpt +++ b/ext/intl/tests/calendar_before_after_error.phpt @@ -62,18 +62,18 @@ try { } ?> --EXPECT-- -error: 0, IntlCalendar::after() expects exactly 1 parameter, 0 given +error: 0, IntlCalendar::after(): Exactly 1 argument is expected, 0 given -error: 0, IntlCalendar::before() expects exactly 1 parameter, 0 given +error: 0, IntlCalendar::before(): Exactly 1 argument is expected, 0 given error: 0, IntlCalendar::after(): Argument #1 ($calendar) must be of type IntlCalendar, int given error: 0, IntlCalendar::before(): Argument #1 ($calendar) must be of type IntlCalendar, int given -error: 0, IntlCalendar::after() expects exactly 1 parameter, 2 given +error: 0, IntlCalendar::after(): Exactly 1 argument is expected, 2 given -error: 0, IntlCalendar::before() expects exactly 1 parameter, 2 given +error: 0, IntlCalendar::before(): Exactly 1 argument is expected, 2 given -error: 0, intlcal_after() expects exactly 2 parameters, 1 given +error: 0, intlcal_after(): Exactly 2 arguments are expected, 1 given -error: 0, intlcal_before() expects exactly 2 parameters, 1 given +error: 0, intlcal_before(): Exactly 2 arguments are expected, 1 given diff --git a/ext/intl/tests/calendar_equals_error.phpt b/ext/intl/tests/calendar_equals_error.phpt index 41a7d1723848a..f25acd1035ced 100644 --- a/ext/intl/tests/calendar_equals_error.phpt +++ b/ext/intl/tests/calendar_equals_error.phpt @@ -46,11 +46,11 @@ try { } ?> --EXPECT-- -error: 0, IntlCalendar::equals() expects exactly 1 parameter, 0 given +error: 0, IntlCalendar::equals(): Exactly 1 argument is expected, 0 given error: 0, IntlCalendar::equals(): Argument #1 ($calendar) must be of type IntlCalendar, stdClass given -error: 0, IntlCalendar::equals() expects exactly 1 parameter, 2 given +error: 0, IntlCalendar::equals(): Exactly 1 argument is expected, 2 given error: 0, intlcal_equals(): Argument #2 ($calendar) must be of type IntlCalendar, array given diff --git a/ext/intl/tests/calendar_fieldDifference_error.phpt b/ext/intl/tests/calendar_fieldDifference_error.phpt index a7b83acdd651d..0ce5a1c8073dd 100644 --- a/ext/intl/tests/calendar_fieldDifference_error.phpt +++ b/ext/intl/tests/calendar_fieldDifference_error.phpt @@ -27,11 +27,11 @@ try { var_dump(intlcal_field_difference(1, 0, 1)); ?> --EXPECTF-- -IntlCalendar::fieldDifference() expects exactly 2 parameters, 3 given +IntlCalendar::fieldDifference(): Exactly 2 arguments are expected, 3 given Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: Call to ICU method has failed in %s on line %d bool(false) -intlcal_field_difference() expects exactly 3 parameters, 4 given +intlcal_field_difference(): Exactly 3 arguments are expected, 4 given Fatal error: Uncaught TypeError: intlcal_field_difference(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d Stack trace: diff --git a/ext/intl/tests/calendar_getLocale_error.phpt b/ext/intl/tests/calendar_getLocale_error.phpt index 7171b4934b4ce..90adb903a40d7 100644 --- a/ext/intl/tests/calendar_getLocale_error.phpt +++ b/ext/intl/tests/calendar_getLocale_error.phpt @@ -13,7 +13,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_get_locale(1)); ?> --EXPECTF-- -Fatal error: Uncaught ArgumentCountError: intlcal_get_locale() expects exactly 2 parameters, 1 given in %s:%d +Fatal error: Uncaught ArgumentCountError: intlcal_get_locale(): Exactly 2 arguments are expected, 1 given in %s:%d Stack trace: #0 %s(%d): intlcal_get_locale(1) #1 {main} diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt index d3fadb16ed230..fe377be47d2e6 100644 --- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt +++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt @@ -76,15 +76,15 @@ try { } ?> --EXPECT-- -ArgumentCountError: 0, intlcal_get() expects exactly 2 parameters, 1 given -ArgumentCountError: 0, intlcal_get_actual_maximum() expects exactly 2 parameters, 1 given -ArgumentCountError: 0, intlcal_get_actual_minimum() expects exactly 2 parameters, 1 given +ArgumentCountError: 0, intlcal_get(): Exactly 2 arguments are expected, 1 given +ArgumentCountError: 0, intlcal_get_actual_maximum(): Exactly 2 arguments are expected, 1 given +ArgumentCountError: 0, intlcal_get_actual_minimum(): Exactly 2 arguments are expected, 1 given ValueError: 0, intlcal_get(): Argument #2 ($field) must be a valid field ValueError: 0, intlcal_get_actual_maximum(): Argument #2 ($field) must be a valid field ValueError: 0, intlcal_get_actual_minimum(): Argument #2 ($field) must be a valid field TypeError: 0, intlcal_get(): Argument #2 ($field) must be of type int, string given TypeError: 0, intlcal_get_actual_maximum(): Argument #2 ($field) must be of type int, string given TypeError: 0, intlcal_get_actual_minimum(): Argument #2 ($field) must be of type int, string given -ArgumentCountError: 0, intlcal_get() expects exactly 2 parameters, 1 given -ArgumentCountError: 0, intlcal_get_actual_maximum() expects exactly 2 parameters, 1 given -ArgumentCountError: 0, intlcal_get_actual_minimum() expects exactly 2 parameters, 1 given +ArgumentCountError: 0, intlcal_get(): Exactly 2 arguments are expected, 1 given +ArgumentCountError: 0, intlcal_get_actual_maximum(): Exactly 2 arguments are expected, 1 given +ArgumentCountError: 0, intlcal_get_actual_minimum(): Exactly 2 arguments are expected, 1 given diff --git a/ext/intl/tests/calendar_isEquivalentTo_error.phpt b/ext/intl/tests/calendar_isEquivalentTo_error.phpt index 1dc36c2a2446f..05b13d54d92b5 100644 --- a/ext/intl/tests/calendar_isEquivalentTo_error.phpt +++ b/ext/intl/tests/calendar_isEquivalentTo_error.phpt @@ -52,11 +52,11 @@ try { --EXPECT-- error: 0, IntlCalendar::isEquivalentTo(): Argument #1 ($calendar) must be of type IntlCalendar, int given -error: 0, IntlCalendar::isEquivalentTo() expects exactly 1 parameter, 2 given +error: 0, IntlCalendar::isEquivalentTo(): Exactly 1 argument is expected, 2 given error: 0, IntlCalendar::isEquivalentTo(): Argument #1 ($calendar) must be of type IntlCalendar, int given -error: 0, intlcal_is_equivalent_to() expects exactly 2 parameters, 1 given +error: 0, intlcal_is_equivalent_to(): Exactly 2 arguments are expected, 1 given error: 0, intlcal_is_equivalent_to(): Argument #2 ($calendar) must be of type IntlCalendar, int given diff --git a/ext/intl/tests/calendar_setTimeZone_error.phpt b/ext/intl/tests/calendar_setTimeZone_error.phpt index 4d3e7fdc6d933..4c7bd40961598 100644 --- a/ext/intl/tests/calendar_setTimeZone_error.phpt +++ b/ext/intl/tests/calendar_setTimeZone_error.phpt @@ -42,10 +42,10 @@ try{ } ?> --EXPECT-- -error: 0, IntlCalendar::setTimeZone() expects exactly 1 parameter, 2 given +error: 0, IntlCalendar::setTimeZone(): Exactly 1 argument is expected, 2 given -error: 0, IntlCalendar::setTimeZone() expects exactly 1 parameter, 0 given +error: 0, IntlCalendar::setTimeZone(): Exactly 1 argument is expected, 0 given -error: 0, intlcal_set_time_zone() expects exactly 2 parameters, 3 given +error: 0, intlcal_set_time_zone(): Exactly 2 arguments are expected, 3 given error: 0, intlcal_set_time_zone(): Argument #1 ($calendar) must be of type IntlCalendar, int given diff --git a/ext/intl/tests/calendar_setTime_error.phpt b/ext/intl/tests/calendar_setTime_error.phpt index 8d4f726081481..6e48fe6df4622 100644 --- a/ext/intl/tests/calendar_setTime_error.phpt +++ b/ext/intl/tests/calendar_setTime_error.phpt @@ -13,7 +13,7 @@ ini_set("intl.error_level", E_WARNING); var_dump(intlcal_set_time(1)); ?> --EXPECTF-- -Fatal error: Uncaught ArgumentCountError: intlcal_set_time() expects exactly 2 parameters, 1 given in %s:%d +Fatal error: Uncaught ArgumentCountError: intlcal_set_time(): Exactly 2 arguments are expected, 1 given in %s:%d Stack trace: #0 %s(%d): intlcal_set_time(1) #1 {main} diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt index bd44356f61308..7f3e71ede565e 100644 --- a/ext/intl/tests/calendar_set_error.phpt +++ b/ext/intl/tests/calendar_set_error.phpt @@ -43,7 +43,7 @@ try { } ?> --EXPECT-- -IntlCalendar::set() expects at most 6 parameters, 7 given +IntlCalendar::set(): At most 6 arguments are expected, 7 given IntlCalendar::set() has no variant with exactly 4 parameters IntlCalendar::set(): Argument #1 ($year) must be a valid field intlcal_set(): Argument #2 ($year) must be a valid field diff --git a/ext/intl/tests/formatter_fail.phpt b/ext/intl/tests/formatter_fail.phpt index 15981178ac5b5..e08500089abc0 100644 --- a/ext/intl/tests/formatter_fail.phpt +++ b/ext/intl/tests/formatter_fail.phpt @@ -95,13 +95,13 @@ foreach($args as $arg) { ?> --EXPECTF-- -ArgumentCountError: NumberFormatter::__construct() expects at least 2 parameters, 0 given in %s on line %d +ArgumentCountError: NumberFormatter::__construct(): At least 2 arguments are expected, 0 given in %s on line %d 'U_ZERO_ERROR' -ArgumentCountError: numfmt_create() expects at least 2 parameters, 0 given in %s on line %d +ArgumentCountError: numfmt_create(): At least 2 arguments are expected, 0 given in %s on line %d 'U_ZERO_ERROR' -ArgumentCountError: NumberFormatter::create() expects at least 2 parameters, 0 given in %s on line %d +ArgumentCountError: NumberFormatter::create(): At least 2 arguments are expected, 0 given in %s on line %d 'U_ZERO_ERROR' Error: NumberFormatter object is already constructed in %s on line %d diff --git a/ext/intl/tests/msgfmt_fail2.phpt b/ext/intl/tests/msgfmt_fail2.phpt index b53e70e8ea280..87a505832a5b7 100644 --- a/ext/intl/tests/msgfmt_fail2.phpt +++ b/ext/intl/tests/msgfmt_fail2.phpt @@ -108,22 +108,22 @@ foreach($args as $arg) { ?> --EXPECTF-- -ArgumentCountError: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d +ArgumentCountError: MessageFormatter::__construct(): Exactly 2 arguments are expected, 0 given in %s on line %d 'U_ZERO_ERROR' -ArgumentCountError: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d +ArgumentCountError: msgfmt_create(): Exactly 2 arguments are expected, 0 given in %s on line %d 'U_ZERO_ERROR' -ArgumentCountError: MessageFormatter::create() expects exactly 2 parameters, 0 given in %s on line %d +ArgumentCountError: MessageFormatter::create(): Exactly 2 arguments are expected, 0 given in %s on line %d 'U_ZERO_ERROR' -ArgumentCountError: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d +ArgumentCountError: MessageFormatter::__construct(): Exactly 2 arguments are expected, 1 given in %s on line %d 'U_ZERO_ERROR' -ArgumentCountError: msgfmt_create() expects exactly 2 parameters, 1 given in %s on line %d +ArgumentCountError: msgfmt_create(): Exactly 2 arguments are expected, 1 given in %s on line %d 'U_ZERO_ERROR' -ArgumentCountError: MessageFormatter::create() expects exactly 2 parameters, 1 given in %s on line %d +ArgumentCountError: MessageFormatter::create(): Exactly 2 arguments are expected, 1 given in %s on line %d 'U_ZERO_ERROR' IntlException: Constructor failed in %s on line %d diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt index d67c3fe6a8a76..c5d6430a35606 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt @@ -134,7 +134,7 @@ require_once('skipifconnectfailure.inc'); --EXPECTF-- mysqli object is not fully initialized [0] Object of class mysqli could not be converted to string in %s on line %d -[0] mysqli_result::fetch_object() expects at most 2 parameters, 3 given in %s on line %d +[0] mysqli_result::fetch_object(): At most 2 arguments are expected, 3 given in %s on line %d [0] mysqli_result::fetch_object(): Argument #2 ($params) must be of type array, null given in %s on line %d Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 1 passed and exactly 2 expected NULL diff --git a/ext/phar/tests/002.phpt b/ext/phar/tests/002.phpt index cfd8cc5e66eea..947295ebccf40 100644 --- a/ext/phar/tests/002.phpt +++ b/ext/phar/tests/002.phpt @@ -17,5 +17,5 @@ try { } __HALT_COMPILER(); ?> --EXPECTF-- -Phar::mapPhar() expects at most 2 parameters, 3 given +Phar::mapPhar(): At most 2 arguments are expected, 3 given internal corruption of phar "%s002.php" (truncated manifest at manifest length) diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt index 2ad994385cc77..eb50a7469123e 100644 --- a/ext/phar/tests/badparameters.phpt +++ b/ext/phar/tests/badparameters.phpt @@ -253,16 +253,16 @@ Phar::compress(): Argument #1 ($compression_type) must be of type int, array giv Cannot compress phar archive, phar is read-only Phar::compressFiles(): Argument #1 ($compression_type) must be of type int, array given Phar is readonly, cannot change compression -Phar::copy() expects exactly 2 parameters, 1 given +Phar::copy(): Exactly 2 arguments are expected, 1 given Cannot copy "a" to "b", phar is read-only Phar::offsetExists(): Argument #1 ($entry) must be a valid path, array given Phar::offsetGet(): Argument #1 ($entry) must be a valid path, array given -Phar::offsetSet() expects exactly 2 parameters, 1 given +Phar::offsetSet(): Exactly 2 arguments are expected, 1 given PharData::offsetUnset(): Argument #1 ($entry) must be a valid path, array given Write operations disabled by the php.ini setting phar.readonly Phar::addEmptyDir(): Argument #1 ($dirname) must be a valid path, array given Phar::addFile(): Argument #1 ($filename) must be a valid path, array given -Phar::addFromString() expects exactly 2 parameters, 1 given +Phar::addFromString(): Exactly 2 arguments are expected, 1 given Write operations disabled by the php.ini setting phar.readonly -Phar::setMetadata() expects exactly 1 parameter, 2 given +Phar::setMetadata(): Exactly 1 argument is expected, 2 given Write operations disabled by the php.ini setting phar.readonly diff --git a/ext/phar/tests/bug60261.phpt b/ext/phar/tests/bug60261.phpt index 7f32bf64822c8..b9cf93d4904e7 100644 --- a/ext/phar/tests/bug60261.phpt +++ b/ext/phar/tests/bug60261.phpt @@ -14,4 +14,4 @@ try { ?> --EXPECT-- -Phar::__construct() expects at least 1 parameter, 0 given +Phar::__construct(): At least 1 argument is expected, 0 given diff --git a/ext/reflection/tests/ReflectionClass_constructor_002.phpt b/ext/reflection/tests/ReflectionClass_constructor_002.phpt index 44ff37a96202e..9bd4fa124be6a 100644 --- a/ext/reflection/tests/ReflectionClass_constructor_002.phpt +++ b/ext/reflection/tests/ReflectionClass_constructor_002.phpt @@ -46,10 +46,10 @@ try { ?> --EXPECT-- -ReflectionClass::__construct() expects exactly 1 parameter, 0 given +ReflectionClass::__construct(): Exactly 1 argument is expected, 0 given Class "" does not exist Class "1" does not exist Class "1" does not exist ReflectionClass::__construct(): Argument #1 ($objectOrClass) must be of type object|string, array given -ReflectionClass::__construct() expects exactly 1 parameter, 2 given +ReflectionClass::__construct(): Exactly 1 argument is expected, 2 given Class "X" does not exist diff --git a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt index 99d5bb7e86a61..eeb68c63c52ff 100644 --- a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt @@ -56,8 +56,8 @@ try { ?> --EXPECT-- Check invalid params: -ReflectionClass::getMethod() expects exactly 1 parameter, 0 given -ReflectionClass::getMethod() expects exactly 1 parameter, 2 given +ReflectionClass::getMethod(): Exactly 1 argument is expected, 0 given +ReflectionClass::getMethod(): Exactly 1 argument is expected, 2 given Method C::() does not exist Method C::1() does not exist Method C::1.5() does not exist diff --git a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt index 606a124d5cc5c..19c9f0cb2dc8c 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt @@ -54,8 +54,8 @@ try { ?> --EXPECT-- Check invalid params: -ReflectionClass::getProperty() expects exactly 1 parameter, 0 given -ReflectionClass::getProperty() expects exactly 1 parameter, 2 given +ReflectionClass::getProperty(): Exactly 1 argument is expected, 0 given +ReflectionClass::getProperty(): Exactly 1 argument is expected, 2 given Property C::$ does not exist Property C::$1 does not exist Property C::$1.5 does not exist diff --git a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt index 3e21780231f0e..6a2cd29d63bd5 100644 --- a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt @@ -39,8 +39,8 @@ try { ?> --EXPECT-- -ReflectionClass::getStaticPropertyValue() expects at most 2 parameters, 3 given -ReflectionClass::getStaticPropertyValue() expects at least 1 parameter, 0 given +ReflectionClass::getStaticPropertyValue(): At most 2 arguments are expected, 3 given +ReflectionClass::getStaticPropertyValue(): At least 1 argument is expected, 0 given Property C::$ does not exist string(3) "def" ReflectionClass::getStaticPropertyValue(): Argument #1 ($name) must be of type string, array given diff --git a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt index 0ea64ca2788f1..6ca0fed6d8de9 100644 --- a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt +++ b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt @@ -144,8 +144,8 @@ Does I2 implement I2? Test bad arguments: -ReflectionClass::implementsInterface() expects exactly 1 parameter, 0 given -ReflectionClass::implementsInterface() expects exactly 1 parameter, 2 given +ReflectionClass::implementsInterface(): Exactly 1 argument is expected, 0 given +ReflectionClass::implementsInterface(): Exactly 1 argument is expected, 2 given Interface "" does not exist Interface "ThisClassDoesNotExist" does not exist Interface "2" does not exist diff --git a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt index d69c16d6ac681..d56dc80c564cb 100644 --- a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt +++ b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt @@ -37,8 +37,8 @@ try { ?> --EXPECT-- Test bad arguments: -ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given -ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given +ReflectionClass::isSubclassOf(): Exactly 1 argument is expected, 0 given +ReflectionClass::isSubclassOf(): Exactly 1 argument is expected, 2 given Class "" does not exist Class "ThisClassDoesNotExist" does not exist Class "2" does not exist diff --git a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt index b9bb76c786e01..29ce40cb2c801 100644 --- a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt +++ b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt @@ -44,9 +44,9 @@ try { ?> --EXPECT-- -ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 3 given -ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 0 given -ReflectionClass::setStaticPropertyValue() expects exactly 2 parameters, 1 given +ReflectionClass::setStaticPropertyValue(): Exactly 2 arguments are expected, 3 given +ReflectionClass::setStaticPropertyValue(): Exactly 2 arguments are expected, 0 given +ReflectionClass::setStaticPropertyValue(): Exactly 2 arguments are expected, 1 given Class C does not have a property named Class C does not have a property named 1.5 ReflectionClass::setStaticPropertyValue(): Argument #1 ($name) must be of type string, array given diff --git a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt index ccf2414e43e8e..3413adc4b32cc 100644 --- a/ext/reflection/tests/ReflectionExtension_constructor_error.phpt +++ b/ext/reflection/tests/ReflectionExtension_constructor_error.phpt @@ -25,7 +25,7 @@ try { ?> ---EXPECTF-- -Ok - ReflectionExtension::__construct() expects exactly %d parameter, %d given -Ok - ReflectionExtension::__construct() expects exactly %d parameter, %d given +--EXPECT-- +Ok - ReflectionExtension::__construct(): Exactly 1 argument is expected, 0 given +Ok - ReflectionExtension::__construct(): Exactly 1 argument is expected, 2 given Ok - ReflectionExtension::__construct(): Argument #1 ($name) must be of type string, array given diff --git a/ext/reflection/tests/ReflectionFunction_construct.001.phpt b/ext/reflection/tests/ReflectionFunction_construct.001.phpt index 307da25e5441d..bdc8e15622ea1 100644 --- a/ext/reflection/tests/ReflectionFunction_construct.001.phpt +++ b/ext/reflection/tests/ReflectionFunction_construct.001.phpt @@ -37,6 +37,6 @@ try { --EXPECT-- Ok - ReflectionFunction::__construct(): Argument #1 ($function) must be of type Closure|string, array given Function nonExistentFunction() does not exist -Ok - ReflectionFunction::__construct() expects exactly 1 parameter, 0 given -Ok - ReflectionFunction::__construct() expects exactly 1 parameter, 2 given +Ok - ReflectionFunction::__construct(): Exactly 1 argument is expected, 0 given +Ok - ReflectionFunction::__construct(): Exactly 1 argument is expected, 2 given Ok - ReflectionFunction::__construct(): Argument #1 ($function) must be of type Closure|string, array given diff --git a/ext/reflection/tests/ReflectionMethod_006.phpt b/ext/reflection/tests/ReflectionMethod_006.phpt index bb29b1cbed1ba..923d9a2befc0a 100644 --- a/ext/reflection/tests/ReflectionMethod_006.phpt +++ b/ext/reflection/tests/ReflectionMethod_006.phpt @@ -19,5 +19,5 @@ try { ?> --EXPECT-- -Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 0 given -Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 3 given +Ok - ReflectionMethod::__construct(): Exactly 1 argument is expected, 0 given +Ok - ReflectionMethod::__construct(): Exactly 1 argument is expected, 3 given diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt index 0b02fb651c132..a26e83526680b 100644 --- a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt +++ b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt @@ -52,10 +52,10 @@ try{ ?> --EXPECT-- Too few arguments: -Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 0 given +Ok - ReflectionMethod::__construct(): Exactly 1 argument is expected, 0 given Too many arguments: -Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 3 given +Ok - ReflectionMethod::__construct(): Exactly 1 argument is expected, 3 given Ok - Class "InvalidClassName" does not exist Ok - ReflectionMethod::__construct(): Argument #1 ($objectOrMethod) must be of type object|string, array given -Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 2 given +Ok - ReflectionMethod::__construct(): Exactly 1 argument is expected, 2 given diff --git a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt index 73c04a687bfec..1d3533679e681 100644 --- a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt +++ b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt @@ -102,7 +102,7 @@ Called methodWithArgs(1, arg2) NULL Static method: -ReflectionMethod::invoke() expects at least 1 parameter, 0 given +ReflectionMethod::invoke(): At least 1 argument is expected, 0 given ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, bool given Called staticMethod() Exception: Using $this when not in object context diff --git a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt index 41042b7530449..e06bee59b5755 100644 --- a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt +++ b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt @@ -37,8 +37,8 @@ try { ?> --EXPECT-- Test bad arguments: -ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given -ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given +ReflectionClass::isSubclassOf(): Exactly 1 argument is expected, 0 given +ReflectionClass::isSubclassOf(): Exactly 1 argument is expected, 2 given Class "" does not exist Class "ThisClassDoesNotExist" does not exist Class "2" does not exist diff --git a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt index 5fa249a9b58a1..a748062b99b52 100644 --- a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt +++ b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt @@ -43,6 +43,6 @@ echo "Done.\n"; Class "A" does not exist Method C::b() does not exist Method C::b() does not exist -Ok - ReflectionParameter::__construct() expects exactly 2 parameters, 1 given +Ok - ReflectionParameter::__construct(): Exactly 2 arguments are expected, 1 given Ok - ReflectionParameter::__construct(): Argument #1 ($function) must be either a string, an array(class, method) or a callable object, int given Done. diff --git a/ext/reflection/tests/ReflectionProperty_error.phpt b/ext/reflection/tests/ReflectionProperty_error.phpt index 052bfcb97c835..00ef4d65a2b5e 100644 --- a/ext/reflection/tests/ReflectionProperty_error.phpt +++ b/ext/reflection/tests/ReflectionProperty_error.phpt @@ -26,6 +26,6 @@ try { ?> --EXPECT-- -Ok - ReflectionProperty::__construct() expects exactly 2 parameters, 0 given -Ok - ReflectionProperty::__construct() expects exactly 2 parameters, 1 given -Ok - ReflectionProperty::__construct() expects exactly 2 parameters, 3 given +Ok - ReflectionProperty::__construct(): Exactly 2 arguments are expected, 0 given +Ok - ReflectionProperty::__construct(): Exactly 2 arguments are expected, 1 given +Ok - ReflectionProperty::__construct(): Exactly 2 arguments are expected, 3 given diff --git a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt index 49b3c7bd9a90c..86c8346c208b7 100644 --- a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt +++ b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt @@ -57,7 +57,7 @@ try { Instance without property: Static property / too many args: -ReflectionProperty::getValue() expects at most 1 parameter, 2 given +ReflectionProperty::getValue(): At most 1 argument is expected, 2 given Protected property: Cannot access non-public property TestClass::$prot diff --git a/ext/session/tests/session_set_save_handler_class_012.phpt b/ext/session/tests/session_set_save_handler_class_012.phpt index 8f019d935b50d..f5d8d0ff00f15 100644 --- a/ext/session/tests/session_set_save_handler_class_012.phpt +++ b/ext/session/tests/session_set_save_handler_class_012.phpt @@ -45,7 +45,7 @@ var_dump(session_id(), $oldHandler, ini_get('session.save_handler'), $handler->i Open Warning: session_start(): Failed to initialize storage module: user (path: ) in %s on line %d -SessionHandler::open() expects exactly 2 parameters, 0 given +SessionHandler::open(): Exactly 2 arguments are expected, 0 given Warning: Undefined variable $_SESSION in %s on line %d string(0) "" diff --git a/ext/soap/tests/bugs/bug31422.phpt b/ext/soap/tests/bugs/bug31422.phpt index 4cf3a6332cec9..3bc0e1cee21f2 100644 --- a/ext/soap/tests/bugs/bug31422.phpt +++ b/ext/soap/tests/bugs/bug31422.phpt @@ -40,5 +40,5 @@ echo "ok\n"; ?> --EXPECT-- -SOAP-ENV:Serverfopen() expects at least 2 parameters, 0 given +SOAP-ENV:Serverfopen(): At least 2 arguments are expected, 0 given ok diff --git a/ext/sockets/tests/socket_connect_params.phpt b/ext/sockets/tests/socket_connect_params.phpt index 608e5d1c2e517..824c7e2168ab9 100644 --- a/ext/sockets/tests/socket_connect_params.phpt +++ b/ext/sockets/tests/socket_connect_params.phpt @@ -31,7 +31,7 @@ $s_w = socket_connect($s_c, '0.0.0.0', $port); socket_close($s_c); ?> --EXPECTF-- -socket_connect() expects at least 2 parameters, 1 given +socket_connect(): At least 2 arguments are expected, 1 given socket_connect(): Argument #3 ($port) cannot be null when the socket type is AF_INET Warning: socket_connect(): unable to connect [%i]: %a in %s on line %d diff --git a/ext/sodium/tests/bug78114.phpt b/ext/sodium/tests/bug78114.phpt index c697ea16f83ca..d0145fa5a5a8c 100644 --- a/ext/sodium/tests/bug78114.phpt +++ b/ext/sodium/tests/bug78114.phpt @@ -13,4 +13,4 @@ try { } ?> --EXPECT-- -sodium_bin2hex() expects exactly 1 parameter, 0 given +sodium_bin2hex(): Exactly 1 argument is expected, 0 given diff --git a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt index c0c5aab1e97d9..6b74aa5863fef 100644 --- a/ext/spl/tests/CallbackFilterIteratorTest-002.phpt +++ b/ext/spl/tests/CallbackFilterIteratorTest-002.phpt @@ -42,8 +42,8 @@ try { } ?> --EXPECT-- -CallbackFilterIterator::__construct() expects exactly 2 parameters, 0 given -CallbackFilterIterator::__construct() expects exactly 2 parameters, 1 given +CallbackFilterIterator::__construct(): Exactly 2 arguments are expected, 0 given +CallbackFilterIterator::__construct(): Exactly 2 arguments are expected, 1 given CallbackFilterIterator::__construct(): Argument #2 ($callback) must be a valid callback, no array or string given CallbackFilterIterator::__construct(): Argument #2 ($callback) must be a valid callback, array must have exactly two members some message diff --git a/ext/spl/tests/arrayObject___construct_error2.phpt b/ext/spl/tests/arrayObject___construct_error2.phpt index 742512e02c816..645f9e73ed0dc 100644 --- a/ext/spl/tests/arrayObject___construct_error2.phpt +++ b/ext/spl/tests/arrayObject___construct_error2.phpt @@ -19,4 +19,4 @@ try { ?> --EXPECT-- Too many arguments: -ArrayObject::__construct() expects at most 3 parameters, 4 given(12) +ArrayObject::__construct(): At most 3 arguments are expected, 4 given(12) diff --git a/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt b/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt index 8eea9c96fd759..6a51b9508e890 100644 --- a/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt +++ b/ext/spl/tests/arrayObject_exchangeArray_basic3.phpt @@ -81,7 +81,7 @@ array(2) { --> exchangeArray() with no arg: -Exception: ArrayObject::exchangeArray() expects exactly 1 parameter, 0 given +Exception: ArrayObject::exchangeArray(): Exactly 1 argument is expected, 0 given Warning: Undefined variable $copy in %s on line %d object(ArrayObject)#2 (1) { diff --git a/ext/spl/tests/arrayObject_uasort_error1.phpt b/ext/spl/tests/arrayObject_uasort_error1.phpt index 30a9734110cd0..67a9f57633a1a 100644 --- a/ext/spl/tests/arrayObject_uasort_error1.phpt +++ b/ext/spl/tests/arrayObject_uasort_error1.phpt @@ -22,5 +22,5 @@ try { } ?> --EXPECT-- -ArrayObject::uasort() expects exactly 1 parameter, 0 given -ArrayObject::uasort() expects exactly 1 parameter, 2 given +ArrayObject::uasort(): Exactly 1 argument is expected, 0 given +ArrayObject::uasort(): Exactly 1 argument is expected, 2 given diff --git a/ext/spl/tests/arrayObject_uksort_error1.phpt b/ext/spl/tests/arrayObject_uksort_error1.phpt index d1f5d5a6509ed..72d2c415718b4 100644 --- a/ext/spl/tests/arrayObject_uksort_error1.phpt +++ b/ext/spl/tests/arrayObject_uksort_error1.phpt @@ -22,5 +22,5 @@ try { } ?> --EXPECT-- -ArrayObject::uksort() expects exactly 1 parameter, 0 given -ArrayObject::uksort() expects exactly 1 parameter, 2 given +ArrayObject::uksort(): Exactly 1 argument is expected, 0 given +ArrayObject::uksort(): Exactly 1 argument is expected, 2 given diff --git a/ext/spl/tests/iterator_056.phpt b/ext/spl/tests/iterator_056.phpt index 28dd444856b9f..1a99f9d01f0b2 100644 --- a/ext/spl/tests/iterator_056.phpt +++ b/ext/spl/tests/iterator_056.phpt @@ -56,9 +56,9 @@ try { ?> --EXPECT-- -FilterIterator::__construct() expects exactly 1 parameter, 0 given -CachingIterator::__construct() expects at least 1 parameter, 0 given -RecursiveCachingIterator::__construct() expects at least 1 parameter, 0 given -ParentIterator::__construct() expects exactly 1 parameter, 0 given -LimitIterator::__construct() expects at least 1 parameter, 0 given -NoRewindIterator::__construct() expects exactly 1 parameter, 0 given +FilterIterator::__construct(): Exactly 1 argument is expected, 0 given +CachingIterator::__construct(): At least 1 argument is expected, 0 given +RecursiveCachingIterator::__construct(): At least 1 argument is expected, 0 given +ParentIterator::__construct(): Exactly 1 argument is expected, 0 given +LimitIterator::__construct(): At least 1 argument is expected, 0 given +NoRewindIterator::__construct(): Exactly 1 argument is expected, 0 given diff --git a/ext/spl/tests/iterator_062.phpt b/ext/spl/tests/iterator_062.phpt index a1440439c1abe..18a42e08cb42e 100644 --- a/ext/spl/tests/iterator_062.phpt +++ b/ext/spl/tests/iterator_062.phpt @@ -15,4 +15,4 @@ try { } ?> --EXPECT-- -RecursiveIteratorIterator::__construct() expects at least 1 parameter, 0 given +RecursiveIteratorIterator::__construct(): At least 1 argument is expected, 0 given diff --git a/ext/spl/tests/recursive_tree_iterator_002.phpt b/ext/spl/tests/recursive_tree_iterator_002.phpt index 048dccaac3d9f..2d54397b8ce87 100644 --- a/ext/spl/tests/recursive_tree_iterator_002.phpt +++ b/ext/spl/tests/recursive_tree_iterator_002.phpt @@ -11,4 +11,4 @@ try { } ?> --EXPECT-- -RecursiveTreeIterator::__construct() expects at least 1 parameter, 0 given +RecursiveTreeIterator::__construct(): At least 1 argument is expected, 0 given diff --git a/ext/spl/tests/spl_004.phpt b/ext/spl/tests/spl_004.phpt index c31d0b6157dc4..ea3791dc90bdd 100644 --- a/ext/spl/tests/spl_004.phpt +++ b/ext/spl/tests/spl_004.phpt @@ -86,4 +86,4 @@ int(4) ===ERRORS=== iterator_apply(): Argument #3 ($args) must be of type ?array, int given iterator_apply(): Argument #2 ($function) must be a valid callback, function "non_existing_function" not found or invalid function name -iterator_apply() expects at most 3 parameters, 4 given +iterator_apply(): At most 3 arguments are expected, 4 given diff --git a/ext/spl/tests/spl_iterator_iterator_constructor.phpt b/ext/spl/tests/spl_iterator_iterator_constructor.phpt index 95457484c8e14..c02eaad86f278 100644 --- a/ext/spl/tests/spl_iterator_iterator_constructor.phpt +++ b/ext/spl/tests/spl_iterator_iterator_constructor.phpt @@ -21,4 +21,4 @@ try { ?> --EXPECT-- -IteratorIterator::__construct() expects at most 2 parameters, 3 given +IteratorIterator::__construct(): At most 2 arguments are expected, 3 given diff --git a/ext/sqlite3/tests/sqlite3_02_open.phpt b/ext/sqlite3/tests/sqlite3_02_open.phpt index dcc38d1407cd3..26079df863e5f 100644 --- a/ext/sqlite3/tests/sqlite3_02_open.phpt +++ b/ext/sqlite3/tests/sqlite3_02_open.phpt @@ -16,4 +16,4 @@ try { ?> --EXPECT-- -string(60) "SQLite3::__construct() expects at least 1 parameter, 0 given" +string(64) "SQLite3::__construct(): At least 1 argument is expected, 0 given" diff --git a/ext/standard/tests/array/array_filter_variation10.phpt b/ext/standard/tests/array/array_filter_variation10.phpt index 5000783a8bd10..b896e639bf4ec 100644 --- a/ext/standard/tests/array/array_filter_variation10.phpt +++ b/ext/standard/tests/array/array_filter_variation10.phpt @@ -87,5 +87,5 @@ array(2) { ["b"]=> int(2) } -is_numeric() expects exactly 1 parameter, 2 given +is_numeric(): Exactly 1 argument is expected, 2 given Done diff --git a/ext/standard/tests/array/array_map_error.phpt b/ext/standard/tests/array/array_map_error.phpt index 5e770083e7052..e800bcbe4541f 100644 --- a/ext/standard/tests/array/array_map_error.phpt +++ b/ext/standard/tests/array/array_map_error.phpt @@ -37,7 +37,7 @@ echo "Done"; *** Testing array_map() : error conditions *** -- Testing array_map() function with one less than expected no. of arguments -- -Exception: array_map() expects at least 2 parameters, 1 given +Exception: array_map(): At least 2 arguments are expected, 1 given -- Testing array_map() function with less no. of arrays than callback function arguments -- Exception: Too few arguments to function callback2(), 1 passed and exactly 2 expected diff --git a/ext/standard/tests/array/array_map_variation12.phpt b/ext/standard/tests/array/array_map_variation12.phpt index 1c4f3b23a1af8..518d30a463f52 100644 --- a/ext/standard/tests/array/array_map_variation12.phpt +++ b/ext/standard/tests/array/array_map_variation12.phpt @@ -42,7 +42,7 @@ array(3) { int(243) } -- with built-in function 'pow' and one parameter -- -pow() expects exactly 2 parameters, 1 given +pow(): Exactly 2 arguments are expected, 1 given -- with language construct -- array_map(): Argument #1 ($callback) must be a valid callback, function "echo" not found or invalid function name Done diff --git a/ext/standard/tests/array/array_walk_error2.phpt b/ext/standard/tests/array/array_walk_error2.phpt index d3209d87c2327..0399c272f43a8 100644 --- a/ext/standard/tests/array/array_walk_error2.phpt +++ b/ext/standard/tests/array/array_walk_error2.phpt @@ -56,5 +56,5 @@ Exception: Too few arguments to function callback2(), 3 passed and exactly 4 exp Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected -- Testing array_walk() function with too many callback parameters -- -Exception: array_walk() expects at most 3 parameters, 4 given +Exception: array_walk(): At most 3 arguments are expected, 4 given Done diff --git a/ext/standard/tests/array/array_walk_recursive_error2.phpt b/ext/standard/tests/array/array_walk_recursive_error2.phpt index ad4fd99ede623..28e6fc1a9aa30 100644 --- a/ext/standard/tests/array/array_walk_recursive_error2.phpt +++ b/ext/standard/tests/array/array_walk_recursive_error2.phpt @@ -56,5 +56,5 @@ Exception: Too few arguments to function callback2(), 3 passed and exactly 4 exp Exception: Too few arguments to function callback1(), 2 passed and exactly 3 expected Exception: Too few arguments to function callback2(), 3 passed and exactly 4 expected -- Testing array_walk_recursive() function with too many callback parameters -- -Exception: array_walk_recursive() expects at most 3 parameters, 4 given +Exception: array_walk_recursive(): At most 3 arguments are expected, 4 given Done diff --git a/ext/standard/tests/password/password_hash_error.phpt b/ext/standard/tests/password/password_hash_error.phpt index ddb5793c815c8..b7a4784eababd 100644 --- a/ext/standard/tests/password/password_hash_error.phpt +++ b/ext/standard/tests/password/password_hash_error.phpt @@ -36,7 +36,7 @@ try { ?> --EXPECT-- -password_hash() expects at least 2 parameters, 1 given +password_hash(): At least 2 arguments are expected, 1 given password_hash(): Argument #2 ($algo) must be of type string|int|null, array given password_hash(): Argument #3 ($options) must be of type array, stdClass given password_hash(): Argument #3 ($options) must be of type array, string given diff --git a/ext/standard/tests/password/password_needs_rehash_error.phpt b/ext/standard/tests/password/password_needs_rehash_error.phpt index aef86ee1247c8..227ab516e6130 100644 --- a/ext/standard/tests/password/password_needs_rehash_error.phpt +++ b/ext/standard/tests/password/password_needs_rehash_error.phpt @@ -30,7 +30,7 @@ try { echo "OK!"; ?> --EXPECT-- -password_needs_rehash() expects at least 2 parameters, 1 given +password_needs_rehash(): At least 2 arguments are expected, 1 given password_needs_rehash(): Argument #2 ($algo) must be of type string|int|null, array given password_needs_rehash(): Argument #1 ($hash) must be of type string, array given password_needs_rehash(): Argument #3 ($options) must be of type array, string given diff --git a/ext/standard/tests/password/password_verify_error.phpt b/ext/standard/tests/password/password_verify_error.phpt index 192a4ae288d49..2cb6925cbb205 100644 --- a/ext/standard/tests/password/password_verify_error.phpt +++ b/ext/standard/tests/password/password_verify_error.phpt @@ -12,4 +12,4 @@ try { ?> --EXPECT-- -password_verify() expects exactly 2 parameters, 1 given +password_verify(): Exactly 2 arguments are expected, 1 given diff --git a/ext/standard/tests/random/random_bytes_error.phpt b/ext/standard/tests/random/random_bytes_error.phpt index 5a8b1d097c16f..51cca7c9b6751 100644 --- a/ext/standard/tests/random/random_bytes_error.phpt +++ b/ext/standard/tests/random/random_bytes_error.phpt @@ -18,5 +18,5 @@ try { ?> --EXPECT-- -random_bytes() expects exactly 1 parameter, 0 given +random_bytes(): Exactly 1 argument is expected, 0 given random_bytes(): Argument #1 ($length) must be greater than 0 diff --git a/ext/standard/tests/random/random_int_error.phpt b/ext/standard/tests/random/random_int_error.phpt index 6d91b38258117..c6f4864987e13 100644 --- a/ext/standard/tests/random/random_int_error.phpt +++ b/ext/standard/tests/random/random_int_error.phpt @@ -24,6 +24,6 @@ try { ?> --EXPECT-- -random_int() expects exactly 2 parameters, 0 given -random_int() expects exactly 2 parameters, 1 given +random_int(): Exactly 2 arguments are expected, 0 given +random_int(): Exactly 2 arguments are expected, 1 given random_int(): Argument #1 ($min) must be less than or equal to argument #2 ($max) diff --git a/ext/standard/tests/strings/chr_error.phpt b/ext/standard/tests/strings/chr_error.phpt index 59dfffd53b1d0..efc8279f7051c 100644 --- a/ext/standard/tests/strings/chr_error.phpt +++ b/ext/standard/tests/strings/chr_error.phpt @@ -25,7 +25,7 @@ try { *** Testing chr() : error conditions *** -- Testing chr() function with no arguments -- -chr() expects exactly 1 parameter, 0 given +chr(): Exactly 1 argument is expected, 0 given -- Testing chr() function with more than expected no. of arguments -- -chr() expects exactly 1 parameter, 2 given +chr(): Exactly 1 argument is expected, 2 given diff --git a/ext/standard/tests/strings/fprintf_error.phpt b/ext/standard/tests/strings/fprintf_error.phpt index 3671300e601e0..efce78443f271 100644 --- a/ext/standard/tests/strings/fprintf_error.phpt +++ b/ext/standard/tests/strings/fprintf_error.phpt @@ -31,7 +31,7 @@ echo "Done\n"; ?> --EXPECT-- *** Testing Error Conditions *** -fprintf() expects at least 2 parameters, 0 given -fprintf() expects at least 2 parameters, 1 given -fprintf() expects at least 2 parameters, 1 given +fprintf(): At least 2 arguments are expected, 0 given +fprintf(): At least 2 arguments are expected, 1 given +fprintf(): At least 2 arguments are expected, 1 given Done diff --git a/ext/standard/tests/strings/printf_64bit.phpt b/ext/standard/tests/strings/printf_64bit.phpt index b0e364b9c98f2..782ed464e2854 100644 --- a/ext/standard/tests/strings/printf_64bit.phpt +++ b/ext/standard/tests/strings/printf_64bit.phpt @@ -238,7 +238,7 @@ printf("%d", $tempstring); ?> --EXPECTF-- *** Output for zero argument *** -printf() expects at least 1 parameter, 0 given +printf(): At least 1 argument is expected, 0 given *** Output for insufficient number of arguments *** Error found: 5 parameters are required, 3 given diff --git a/ext/standard/tests/strings/printf_error.phpt b/ext/standard/tests/strings/printf_error.phpt index 819bb7d1e0f8d..700bbe8ac8b0d 100644 --- a/ext/standard/tests/strings/printf_error.phpt +++ b/ext/standard/tests/strings/printf_error.phpt @@ -60,7 +60,7 @@ try { *** Testing printf() : error conditions *** -- Testing printf() function with Zero arguments -- -printf() expects at least 1 parameter, 0 given +printf(): At least 1 argument is expected, 0 given -- Testing printf() function with less than expected no. of arguments -- diff --git a/ext/standard/tests/strings/sprintf_error.phpt b/ext/standard/tests/strings/sprintf_error.phpt index 89ff16b72ba3b..60f91bfb6a388 100644 --- a/ext/standard/tests/strings/sprintf_error.phpt +++ b/ext/standard/tests/strings/sprintf_error.phpt @@ -69,11 +69,11 @@ try { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing sprintf() : error conditions *** -- Testing sprintf() function with Zero arguments -- -sprintf() expects at least %d parameter, %d given +sprintf(): At least 1 argument is expected, 0 given -- Testing sprintf() function with less than expected no. of arguments -- 2 parameters are required, 1 given diff --git a/ext/standard/tests/strings/vfprintf_error1.phpt b/ext/standard/tests/strings/vfprintf_error1.phpt index d93de7dc560b6..37fdd6b7ed774 100644 --- a/ext/standard/tests/strings/vfprintf_error1.phpt +++ b/ext/standard/tests/strings/vfprintf_error1.phpt @@ -38,5 +38,5 @@ unlink( $file ); ?> --EXPECT-- -- Testing vfprintf() function with more than expected no. of arguments -- -vfprintf() expects exactly 3 parameters, 4 given -vfprintf() expects exactly 3 parameters, 4 given +vfprintf(): Exactly 3 arguments are expected, 4 given +vfprintf(): Exactly 3 arguments are expected, 4 given diff --git a/tests/output/ob_014.phpt b/tests/output/ob_014.phpt index bc46f2ae580c1..c4c9c8694500e 100644 --- a/tests/output/ob_014.phpt +++ b/tests/output/ob_014.phpt @@ -12,4 +12,4 @@ try { ?> --EXPECT-- foo -str_rot13() expects exactly 1 parameter, 2 given +str_rot13(): Exactly 1 argument is expected, 2 given diff --git a/tests/output/ob_015.phpt b/tests/output/ob_015.phpt index 2bc08687d77fd..fbd4e259a2677 100644 --- a/tests/output/ob_015.phpt +++ b/tests/output/ob_015.phpt @@ -12,4 +12,4 @@ ob_end_flush(); ?> --EXPECT-- foo -str_rot13() expects exactly 1 parameter, 2 given +str_rot13(): Exactly 1 argument is expected, 2 given