From be0ff2401a2543830e4bc8ea77a45ef70a6162ac Mon Sep 17 00:00:00 2001 From: Petr Shumilov Date: Thu, 26 Mar 2026 17:19:37 +0300 Subject: [PATCH] Enable bundle of phpt tests for k2 Signed-off-by: Petr Shumilov --- tests/phpt/array/028_explode_error.php | 2 +- tests/phpt/array/029_explode_error.php | 2 +- tests/phpt/array/031_explode_error.php | 2 +- tests/phpt/array_access/002_set_append.php | 2 +- tests/phpt/array_access/003_as_array_access.php | 2 +- tests/phpt/array_access/005_inheritance.php | 2 +- tests/phpt/array_access/007_assignment_chain.php | 2 +- tests/phpt/array_access/008_isset_unset.php | 2 +- tests/phpt/array_access/009_empty.php | 2 +- tests/phpt/by_name/01_by_name_construct.php | 2 +- tests/phpt/by_name/02_by_name_call.php | 2 +- tests/phpt/by_name/03_by_name_get_const.php | 2 +- tests/phpt/by_name/04_by_name_get_field.php | 2 +- tests/phpt/by_name/100_by_name_non_constexpr.php | 2 +- tests/phpt/by_name/102_get_unresolved.php | 2 +- tests/phpt/by_name/103_by_name_private_1.php | 2 +- tests/phpt/by_name/103_by_name_private_2.php | 2 +- tests/phpt/by_name/105_direct_by_name_call.php | 2 +- tests/phpt/by_name/106_by_name_wrong_args.php | 2 +- tests/phpt/by_name/107_by_name_wrong_tinf.php | 2 +- tests/phpt/cl/001_base_class.php | 2 +- tests/phpt/cl/002_use.php | 2 +- tests/phpt/cl/003_class_in_class.php | 2 +- tests/phpt/cl/005_cast_to_array_debug.php | 2 +- tests/phpt/cl/006_interface_cast_to_array.php | 2 +- tests/phpt/cl/007_to_array_debug_with_extends.php | 2 +- tests/phpt/cl/008_fields_default_value.php | 2 +- tests/phpt/cl/009_to_array_debug_with_class_names.php | 2 +- tests/phpt/cl/027_ternary_operator_assumptions.php | 2 +- tests/phpt/cl/030_resolve_from_phpdoc.php | 2 +- tests/phpt/cl/111_Memcache.php | 2 +- tests/phpt/cl/116_wa_serialize.php | 2 +- tests/phpt/cl/128_prop_of_same_class.php | 2 +- tests/phpt/cl/139_class_inside_fork.php | 2 +- tests/phpt/cl/140_class_from_fork.php | 2 +- tests/phpt/cl/198_concatenation.php | 2 +- tests/phpt/class_inheritance/010_to_array_debug.php | 2 +- tests/phpt/class_inheritance/022_ref_cnt.php | 2 +- ..._just_has_clone_method_with_exception_but_never_use_it.php | 2 +- tests/phpt/clone_keyword/006_reference_count.php | 2 +- tests/phpt/clone_keyword/007_clone_interfaces.php | 2 +- tests/phpt/colors/015_colored_resumable.php | 2 +- tests/phpt/colors/016_colored_resumable_2.php | 2 +- tests/phpt/declare/01_strict_types.php | 2 +- tests/phpt/declare/02_strict_types2.php | 2 +- tests/phpt/declare/03_strict_types_error.php | 2 +- tests/phpt/declare/09_strict_types_not_enabled.php | 2 +- tests/phpt/dl/1005_op_pow.php | 2 +- tests/phpt/dl/1008_fail_class_instance_with_index_key.php | 2 +- tests/phpt/dl/1023_short_list_assignment.php | 2 +- tests/phpt/dl/1025_sprintf_dollar_sign.php | 2 +- tests/phpt/dl/1026_hrtime.php | 2 +- tests/phpt/dl/1028_math_constants.php | 2 +- tests/phpt/dl/1035_to_array_debug_tuple.php | 2 +- tests/phpt/dl/1040_nohint_always_throw.php | 2 +- tests/phpt/dl/386_random_int.php | 2 +- tests/phpt/dl/389_regexp.php | 2 +- tests/phpt/dl/390_int_to_string.php | 2 +- tests/phpt/dl/392_int64_indexing.php | 2 +- tests/phpt/dl/417_unset.php | 2 +- tests/phpt/dl/430_htmlentities.php | 2 +- tests/phpt/dl/433_nl2br.php | 2 +- tests/phpt/dl/440_str_replace_char.php | 2 +- tests/phpt/dl/443_vector.php | 2 +- tests/phpt/dl/445_divide.php | 2 +- tests/phpt/dl/460_OrFalse.php | 2 +- tests/phpt/dl/462_foreach.php | 2 +- tests/phpt/dl/465_pack64bit.php | 2 +- tests/phpt/dl/468_convertToXML.php | 2 +- tests/phpt/dl/470_fasta.php | 2 +- tests/phpt/dl/471_pfannkuchen.php | 2 +- tests/phpt/dl/481_parse_str.php | 2 +- tests/phpt/dl/485_str_pad.php | 2 +- tests/phpt/dl/503_strrchr.php | 2 +- tests/phpt/dl/948_hashmap.php | 2 +- tests/phpt/dl/949.php | 2 +- tests/phpt/dl/951_infer.php | 2 +- tests/phpt/dl/952_cfg_uninited.php | 2 +- tests/phpt/dl/956_dna_regex.php | 2 +- tests/phpt/dl/957_concat.php | 2 +- tests/phpt/dl/959_default_args.php | 2 +- tests/phpt/dl/960_push_back.php | 2 +- tests/phpt/dl/961_const_data.php | 2 +- tests/phpt/dl/964_try.php | 2 +- tests/phpt/dl/965_bin_func.php | 4 ++-- tests/phpt/dl/970_line.php | 2 +- tests/phpt/dl/974_callback.php | 2 +- tests/phpt/dl/975_bug.php | 2 +- tests/phpt/dl/980_push.php | 2 +- tests/phpt/dl/981_chr.php | 2 +- tests/phpt/dl/switch/03_string.php | 4 ++-- tests/phpt/errors/005_sort_tuple_array.php | 2 +- tests/phpt/exceptions/12_throwable_methods.php | 2 +- tests/phpt/fork/005_fork_primitives.php | 2 +- tests/phpt/fork/009_fork_void.php | 2 +- tests/phpt/fork/010_wait.php | 2 +- tests/phpt/fork/011_queue.php | 2 +- tests/phpt/fork/014_wait_global.php | 2 +- tests/phpt/fork/015_save_to_instance_prop.php | 2 +- tests/phpt/fork/019_ternary_operator_in_resumable_expr.php | 2 +- tests/phpt/fork/020_logical_operators_in_resumable_expr.php | 2 +- tests/phpt/fork/021_null_coalesce_in_resumable_expr.php | 2 +- tests/phpt/fork/023_op_set_in_resumable_expr.php | 2 +- ..._fork_unreachable_resumable_lambda_to_builtin_function.php | 2 +- tests/phpt/generics/017_templates_primitives.php | 2 +- tests/phpt/generics/019_templates_and_lambdas.php | 2 +- tests/phpt/generics/024_wrappers_for_json.php | 2 +- tests/phpt/generics/026_variadic_generics.php | 2 +- tests/phpt/generics/027_constexpr_switch.php | 2 +- tests/phpt/generics/028_constexpr_services_cont.php | 2 +- tests/phpt/header_register_callback/throw_error_1.php | 2 +- tests/phpt/header_register_callback/throw_error_2.php | 2 +- tests/phpt/header_register_callback/throw_error_3.php | 2 +- .../phpt/instance_cache/10_instance_cache_abstract_error.php | 2 +- .../12_instance_cache_polymprphic_field_error.php | 2 +- .../instance_cache/2_instance_cache_mutable_store_error.php | 2 +- .../instance_cache/3_instance_cache_mutable_fetch_error.php | 2 +- .../instance_cache/4_instance_cache_non_instance_error.php | 2 +- .../instance_cache/5_instance_cache_polymorphic_simple.php | 2 +- .../instance_cache/6_instance_cache_polymorphic_error.php | 2 +- .../phpt/instance_cache/8_instance_cache_interface_error.php | 2 +- tests/phpt/instance_cache/9_instance_cache_abstract.php | 2 +- tests/phpt/interfaces/007_varargs_in_interface.php | 2 +- tests/phpt/interfaces/023_variadic_and_kphp_infer.php | 2 +- tests/phpt/interfaces/024_instanceof_inside_static_method.php | 2 +- tests/phpt/job_workers/1_interface_compilation.php | 2 +- .../2_shared_immutable_messages_basic_compilation.php | 2 +- tests/phpt/lambdas/004_return_lambda.php | 2 +- tests/phpt/lambdas/007_use_lambda_inside_class.php | 2 +- tests/phpt/lambdas/019_unreachable_lambda.php | 2 +- tests/phpt/lambdas/022_implicit_capturing_of_this.php | 2 +- tests/phpt/lambdas/023_deduce_typed_callable.php | 2 +- .../027_pass_field_as_argument_of_lambda_without_php_doc.php | 2 +- ...lambda_with_use_through_variable_to_internal_functions.php | 2 +- .../lambdas/032_pass_class_method_as_lambda_to_builtin.php | 2 +- tests/phpt/lambdas/049_forks_and_lambdas.php | 2 +- tests/phpt/lambdas/051_lambdas_and_variadics.php | 2 +- tests/phpt/lambdas/052_modify_captured_vars.php | 2 +- tests/phpt/lambdas/054_lambdas_capture_smart_casts.php | 2 +- tests/phpt/lambdas/104_empty_array_in_extern_function.php | 2 +- tests/phpt/lambdas/112_invalid_callbacks_invoked.php | 2 +- tests/phpt/lambdas/113_array_map_void_callback_fail.php | 2 +- tests/phpt/lambdas/115_use_refs_in_array_map_fail.php | 2 +- tests/phpt/migration_php8/007_string_string_comparison.php | 2 +- tests/phpt/migration_php8/009_blank_no_warning.php | 2 +- tests/phpt/mixed/non_primitive/014_class_as_int.php | 2 +- .../001_simple_yaml_project/001_simple_yaml_project.php | 2 +- tests/phpt/modulite/005_inheritance/005_inheritance.php | 2 +- .../123_call_composer_submod/123_call_composer_submod.php | 2 +- tests/phpt/msgpack_serialize/011_russian_letters.php | 2 +- tests/phpt/msgpack_serialize/015_serialize_with_base.php | 2 +- tests/phpt/msgpack_serialize/017_deserialize_huge_array.php | 2 +- .../msgpack_serialize/019_serialize_vector_instead_of_map.php | 2 +- tests/phpt/msgpack_serialize/020_int64_as_mixed.php | 2 +- tests/phpt/msgpack_serialize/100_duplicated_tags.php | 2 +- tests/phpt/msgpack_serialize/101_bad_tag_value.php | 2 +- tests/phpt/msgpack_serialize/103_serialize_with_base.php | 2 +- tests/phpt/msgpack_serialize/105_skipped_tag.php | 2 +- tests/phpt/msgpack_serialize/106_kphp_tag_static_field.php | 2 +- tests/phpt/msgpack_serialize/107_serialize_pure_interface.php | 2 +- tests/phpt/msgpack_serialize/108_empty_field_id.php | 2 +- tests/phpt/msgpack_serialize/109_wrong_field_id.php | 2 +- .../110_deserialize_class_without_annotation.php | 2 +- .../msgpack_serialize/111_non_serializable_inner_class.php | 2 +- .../phpt/msgpack_serialize/113_duplicated_inherited_tags.php | 2 +- tests/phpt/nn/005_json_encode_force_object.php | 2 +- tests/phpt/nn/007_preg_match_offset.php | 2 +- tests/phpt/null_coalescing/11_assumptions.php | 2 +- tests/phpt/null_coalescing/12_assignment.php | 2 +- tests/phpt/null_coalescing/13_assignment_call_rhs.php | 2 +- tests/phpt/null_coalescing/14_assignment_throw_exceptions.php | 2 +- tests/phpt/null_coalescing/1_variables.php | 2 +- tests/phpt/null_coalescing/2_arrays.php | 2 +- tests/phpt/null_coalescing/3_string.php | 2 +- tests/phpt/null_coalescing/5_type_infer.php | 2 +- tests/phpt/null_coalescing/9_tuples.php | 2 +- tests/phpt/optional/002_array_operations.php | 2 +- tests/phpt/optional/003_serialization.php | 2 +- tests/phpt/optional/004_operations.php | 2 +- tests/phpt/optional/008_return_optional_from_fork.php | 2 +- tests/phpt/performance_inspections/13_warn_tag_for_class.php | 2 +- .../performance_inspections/14_warn_tag_for_interface.php | 2 +- .../phpt/performance_inspections/5_array_merge_into_warn.php | 2 +- .../performance_inspections/6_array_merge_into_no_warn.php | 2 +- .../9_constant_execution_in_loop_warn.php | 2 +- tests/phpt/phc/parsing/allowed_offset_types.php | 2 +- tests/phpt/phc/parsing/assignments.php | 2 +- tests/phpt/phc/parsing/binops1.php | 2 +- tests/phpt/phc/parsing/binops3.php | 2 +- tests/phpt/phc/parsing/binops4.php | 2 +- tests/phpt/phc/parsing/negative_literals.php | 2 +- tests/phpt/phc/parsing/php7_4/arglist_trailing_comma.php | 2 +- tests/phpt/phc/parsing/php7_4/arrowfunc.php | 2 +- .../phc/parsing/php7_4/arrowfunc_undef_refparam_error.php | 2 +- tests/phpt/phpdocs/021_failing_callbacks.php | 2 +- tests/phpt/phpdocs/026_mix_assum_and_subkey.php | 2 +- tests/phpt/phpdocs/027_type_hints_with_phpdocs.php | 2 +- tests/phpt/phpdocs/030_hint_but_always_throw.php | 2 +- tests/phpt/pk/011_substr.php | 2 +- tests/phpt/pk/026_no_return.php | 2 +- .../pk/030_header_register_callback_unreachable_in_cli.php | 2 +- tests/phpt/shutdown_functions/throw_error1.php | 2 +- tests/phpt/shutdown_functions/throw_error2.php | 2 +- tests/phpt/shutdown_functions/throw_error3.php | 2 +- tests/phpt/smart_casts/05_inside_operators.php | 2 +- tests/phpt/spread/001_spread.php | 2 +- tests/phpt/sprintf/002_vprintf.php | 2 +- tests/phpt/stacktrace/10_stacktrace.php | 2 +- tests/phpt/string_functions/001_strip_tags_7_4.php | 2 +- tests/phpt/string_functions/002_substr_replace.php | 2 +- tests/phpt/string_functions/003_strip_tags_mixed_arg.php | 2 +- tests/phpt/string_functions/007_strspn.php | 2 +- tests/phpt/tup/013_tuple_inside_fork.php | 2 +- tests/phpt/tup/015_tuple_from_fork.php | 2 +- tests/phpt/typehints/params/08_classes_and_scalars.php | 2 +- tests/phpt/typehints/params/variadic/02_classes.php | 2 +- tests/phpt/typehints/params/variadic/03_nullable.php | 2 +- tests/phpt/typehints/return_types/01_scalar_typehints.php | 2 +- tests/phpt/utils/01_kphp_should_not_throw_phpdoc.php | 2 +- .../phpt/variadic_args/000_simple_fun_with_variadic_args.php | 2 +- tests/phpt/variadic_args/001_fun_with_some_args_before.php | 2 +- tests/phpt/variadic_args/002_method_with_variadics.php | 2 +- tests/phpt/variadic_args/003_modification_variadic.php | 2 +- tests/phpt/variadic_args/004_simple_unpacking_array.php | 2 +- .../phpt/variadic_args/005_unpacking_with_positional_args.php | 2 +- tests/phpt/variadic_args/006_unpacking_several_variadics.php | 2 +- tests/phpt/variadic_args/007_forward_varargs.php | 2 +- tests/phpt/variadic_args/008_unpacking_not_variables.php | 2 +- tests/phpt/variadic_args/009_variadic_lambdas.php | 2 +- tests/phpt/variadic_args/010_variadic_with_callable.php | 2 +- .../011_pass_callable_with_variadic_as_string.php | 2 +- tests/phpt/variadic_args/012_php_doc_variadic.php | 2 +- tests/phpt/variadic_args/013_varg_phpdoc_1.php | 2 +- tests/phpt/variadic_args/014_varg_phpdoc_2.php | 2 +- tests/phpt/variadic_args/015_constructor.php | 2 +- tests/phpt/variadic_args/112_bad_count_after_unpack.php | 2 +- tests/phpt/warnings/1_ub_foreach_var_trycatch.php | 2 +- tests/phpt/warnings/2_ub_foreach_var_trycatch2.php | 2 +- tests/phpt/warnings/3_ub_var_trycatch.php | 2 +- tests/phpt/zstd/3_compress_uncompress.php | 2 +- 240 files changed, 242 insertions(+), 242 deletions(-) diff --git a/tests/phpt/array/028_explode_error.php b/tests/phpt/array/028_explode_error.php index d6e3f1e41b..3572e1509c 100644 --- a/tests/phpt/array/028_explode_error.php +++ b/tests/phpt/array/028_explode_error.php @@ -1,4 +1,4 @@ -@kphp_should_fail k2_skip +@kphp_should_fail /isset, !==, ===, is_array or similar function result may differ from PHP/ /ExprNode explode\[\.\] at 028_explode_error\.php:7/ / /\$class_name::sf\(\);/ /Too few arguments in call to A::sf\(\), expected 1, have 0/ diff --git a/tests/phpt/by_name/107_by_name_wrong_tinf.php b/tests/phpt/by_name/107_by_name_wrong_tinf.php index 9759be538a..650f883493 100644 --- a/tests/phpt/by_name/107_by_name_wrong_tinf.php +++ b/tests/phpt/by_name/107_by_name_wrong_tinf.php @@ -1,4 +1,4 @@ -@kphp_should_fail k2_skip +@kphp_should_fail KPHP_SHOW_ALL_TYPE_ERRORS=1 /in callByName/ /pass string to argument \$a of A::sf/ diff --git a/tests/phpt/cl/001_base_class.php b/tests/phpt/cl/001_base_class.php index 092107f95e..3ea87267b5 100644 --- a/tests/phpt/cl/001_base_class.php +++ b/tests/phpt/cl/001_base_class.php @@ -1,4 +1,4 @@ -@ok k2_skip +@ok resum -> resum2 -> callurl@has-curl/ array()), 'foo', array ('bar[' => array()), array ('bar[' => array())); $query = http_build_query ($array); diff --git a/tests/phpt/dl/485_str_pad.php b/tests/phpt/dl/485_str_pad.php index 9c67b03de9..7ac6707bd4 100644 --- a/tests/phpt/dl/485_str_pad.php +++ b/tests/phpt/dl/485_str_pad.php @@ -1,4 +1,4 @@ -@ok k2_skip +@ok =0 and < than 127/ /kphp-serialized-field\(128\) must be >=0 and < than 127/ \) can be replaced with array_merge_into\(\$x, <...>\)/ diff --git a/tests/phpt/performance_inspections/14_warn_tag_for_interface.php b/tests/phpt/performance_inspections/14_warn_tag_for_interface.php index 0d75c15343..b39d3204bf 100644 --- a/tests/phpt/performance_inspections/14_warn_tag_for_interface.php +++ b/tests/phpt/performance_inspections/14_warn_tag_for_interface.php @@ -1,4 +1,4 @@ -@kphp_should_warn k2_skip +@kphp_should_warn /variable \$y1 can be reserved with array_reserve functions family out of loop/ /Performance inspection 'array\-reserve' enabled by: TestInterface::interface_function \-> TestInterfaceImpl1::interface_function/ /expression \$x = array_merge\(\$x, <...>\) can be replaced with array_merge_into\(\$x, <...>\)/ diff --git a/tests/phpt/performance_inspections/5_array_merge_into_warn.php b/tests/phpt/performance_inspections/5_array_merge_into_warn.php index 84bf9b1389..6eb3cc1b65 100644 --- a/tests/phpt/performance_inspections/5_array_merge_into_warn.php +++ b/tests/phpt/performance_inspections/5_array_merge_into_warn.php @@ -1,4 +1,4 @@ -@kphp_should_warn k2_skip +@kphp_should_warn /expression \$x = array_merge\(\$x, <...>\) can be replaced with array_merge_into\(\$x, <...>\)/ /expression \$y\['hello'\] = array_merge\(\$y\['hello'\], <...>\) can be replaced with array_merge_into\(\$y\['hello'\], <...>\)/ /expression \$z\['x'\]\[\$y\['hello'\]\[0\]\] = array_merge\(\$z\['x'\]\[\$y\['hello'\]\[0\]\], <...>\) can be replaced with array_merge_into\(\$z\['x'\]\[\$y\['hello'\]\[0\]\], <...>\)/ diff --git a/tests/phpt/performance_inspections/6_array_merge_into_no_warn.php b/tests/phpt/performance_inspections/6_array_merge_into_no_warn.php index 43c42e5c9e..1a271de2d6 100644 --- a/tests/phpt/performance_inspections/6_array_merge_into_no_warn.php +++ b/tests/phpt/performance_inspections/6_array_merge_into_no_warn.php @@ -1,4 +1,4 @@ -@ok k2_skip +@ok KPHP_ERROR_ON_WARNINGS=1