php-src/ext/zend_test/tests
Ilija Tovilo f8d1864bbb
Delay #[Attribute] arg validation until runtime
Fixes GH-13970
Closes GH-14105

We cannot validate at compile-time for multiple reasons:

* Evaluating the argument naively with zend_get_attribute_value can lead to code
  execution at compile time through the new expression, leading to possible
  reentrance of the compiler.
* Even if the evaluation was possible, it would need to be restricted to the
  current file, because constant values coming from other files can change
  without affecting the current compilation unit. For this reason, validation
  would need to be repeated at runtime anyway.
* Enums cannot be instantiated at compile-time (the actual bug report). This
  could be allowed here, because the value is immediately destroyed. But given
  the other issues, this won't be needed.

Instead, we just move it to runtime entirely. It's only needed for
ReflectionAttribute::newInstance(), which is not particularly a hot path. The
checks are also simple.
2024-05-06 12:38:56 +02:00
..
iterators adds failing test case for #12060 2023-09-05 10:23:22 +01:00
attribute-promotion-parameter-only.phpt Properly deal with internal attributes used on promoted properties. 2022-11-03 14:29:22 +01:00
attribute-promotion-property-only.phpt Properly deal with internal attributes used on promoted properties. 2022-11-03 14:29:22 +01:00
attribute_arguments.phpt Add tests for function parameter attributes to ext/zend_test 2022-03-07 22:10:54 +01:00
attribute_hash_table_leak.phpt Add tests for function parameter attributes to ext/zend_test 2022-03-07 22:10:54 +01:00
execute_internal.phpt Add test, fix x86 JIT 2023-03-13 12:36:59 +01:00
fiber_test_01.phpt Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
fiber_test_02.phpt Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
fiber_test_03.phpt Reorganize zend_test and add custom fiber implementation tests (#7137) 2021-06-11 12:25:47 -05:00
fiber_test_04.phpt Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
fiber_test_05.phpt Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
fiber_test_06.phpt Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
fiber_test_07.phpt Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
gen_stub_test_01.phpt Fix GH-12558 Escape \N in generated stubs (#12562) 2023-10-31 10:06:56 +01:00
gen_stub_test_02.phpt Add support for generating namespaced constant 2023-02-23 10:05:30 +01:00
get_function_or_method_name_01.inc Fix get_function_or_method_name when included file is scoped (#8467) 2022-05-03 21:34:01 +02:00
get_function_or_method_name_01.phpt Merge branch 'PHP-8.0' into PHP-8.1 2022-05-03 21:36:42 +02:00
gh8575.phpt Allow to not close stream on rscr dtor in php cli sapi 2022-07-18 10:58:50 +01:00
gh9871.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
gh10370.tar Fix GH-10370: File corruption in _php_stream_copy_to_stream_ex when using copy_file_range (#10440) 2023-02-10 13:08:44 +01:00
gh10370_1.phpt Fix concurrent testing 2023-02-10 13:31:57 +01:00
gh10370_2.phpt Fix concurrent testing 2023-02-10 13:31:57 +01:00
gh10370_3.phpt Fix concurrent testing 2023-02-10 13:31:57 +01:00
gh10370_4.phpt Fix concurrent testing 2023-02-10 13:31:57 +01:00
gh13970.phpt Delay #[Attribute] arg validation until runtime 2024-05-06 12:38:56 +02:00
internal-call-internal-static-return.phpt Get rid of invalid assertion and cleanup zend_call_method 2022-06-01 10:50:50 +02:00
internal_magic_call.phpt Fix leak of call->extra_named_params on internal __call 2023-12-01 16:49:16 +01:00
observer.inc
observer_backtrace_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_basic_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_basic_02.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_basic_03.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_basic_04.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_basic_05.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_basic_06.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_bug81430_1.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_bug81430_2.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_bug81435.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_call_user_func_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_call_user_func_02.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_call_user_func_03.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_call_user_func_04.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_closure_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_closure_02.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_closure_03.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_declarations_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_declarations_file_cache.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_error_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_error_02.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_error_03.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_error_04.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_error_05.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_eval_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_exception_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_fiber_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_fiber_02.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_fiber_03.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_fiber_04.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_fiber_05.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_fiber_06.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_fiber_functions_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_fiber_functions_02.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_fiber_functions_03.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_generator_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_generator_02.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_generator_03.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_generator_04.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_generator_05.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_magic_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_opline_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_preload.inc Fix opcache preload with observers enabled 2022-11-09 16:36:28 +01:00
observer_preload.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_retval_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_retval_02.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_retval_03.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_retval_04.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_retval_05.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_retval_06.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_retval_07.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_retval_by_ref_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_retval_by_ref_02.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_retval_by_ref_03.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_shutdown_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_shutdown_02.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_sqlite_create_function.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_types_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
observer_zend_call_function_01.phpt Run one testsuite with observers enabled in CI (#13869) 2024-04-02 18:11:02 +02:00
opline_dangling.phpt USE_ZEND_ALLOC=1 in tests with zend_test.observe_opline_in_zendmm=1 2023-11-25 18:44:45 +01:00
opline_dangling_02.phpt USE_ZEND_ALLOC=1 in tests with zend_test.observe_opline_in_zendmm=1 2023-11-25 18:44:45 +01:00
optimizer_register_pass.phpt Skip some tests under --preload 2021-07-30 17:26:39 +02:00
variadic_arguments.phpt Fixed strict zpp arginfo test 2023-03-09 11:40:47 +00:00
zend_forbid_dynamic_call.phpt Use get_active_function_or_method_name() for zend_forbid_dynamic_call() (#8762) 2022-06-16 12:02:53 +01:00
zend_ini_str_validator_basic.phpt Add zend_string INI validators 2022-09-06 10:41:47 +01:00
zend_ini_str_validator_return_from_func.phpt Add zend_string INI validators 2022-09-06 10:41:47 +01:00
zend_internal_class_prop_intersection.phpt Add support for stubs to declare intersection type class properties (#8751) 2022-07-22 13:04:49 +01:00
zend_legacy_iterable.phpt Convert iterable into an internal alias for Traversable|array (#7309) 2022-06-07 13:35:34 +01:00
zend_test_compile_string.phpt Support specifying start position in compile_string 2021-09-30 10:21:33 +02:00
zend_weakmap.phpt Convert iterable into an internal alias for Traversable|array (#7309) 2022-06-07 13:35:34 +01:00