php-src/Zend/tests/use_function
Nikita Popov 8754b191f7 Fix "already in use" check inconsistencies/bugs
This fixes the following issues:
 * "use function" and "use const" inside namespaced code were checking
   for conflicts against class imports. Now they always check against
   the correct symbol type.
 * Symbol conflicts are now always checked within a single file only.
   Previously class uses inside namespaced code were checked globally.
   This behavior is illegal because symbols from other files are not
   visible if opcache is used, resulting in behavioral discrepancies.
   Additionally this made the presence/absence of symbol errors dependent
   on autoloading order, which is volatile.
 * The "single file" restriction is now enforced by collecting defined
   symbols inside a separate hash table. Previously it was enforced
   (for the non-namespaced case) by comparing the filename of the
   symbol declaration. However this is inaccurate if the same filename
   is used multiple times, such as may happen if eval() is used.
 * Additionally the previous approach relies on symbols being registered
   at compile-time, which is not the case for late-bound classes, which
   makes the behavior dependent on class declaration order, as well as
   opcache (which may cause delayed early-binding).
 * Lastly, conflicts are now consistently checked for conditionally
   defined symbols. Previously only declaration-after-use conflicts were
   checked in this case. Now use-after-declaration conflicts are
   detected as well.
2016-10-07 00:12:55 +02:00
..
includes Disallow using functions/consts defined in the same file 2013-08-25 00:02:46 +02:00
alias.phpt
basic.phpt
case_insensivity.phpt Clarify type of use in error messages 2013-10-14 23:32:11 +02:00
conditional_function_declaration.phpt Fix "already in use" check inconsistencies/bugs 2016-10-07 00:12:55 +02:00
conflicting_use_alias.phpt Add test case for conflicting use and use function alias (stas) 2013-08-22 15:51:26 +02:00
conflicting_use_const_alias.phpt Adjust some test names, remove obsolete and duplicate tests (nikic) 2013-08-25 14:03:07 +02:00
conflicting_use.phpt Clarify type of use in error messages 2013-10-14 23:32:11 +02:00
define_imported_before.phpt Add "Done" output to distinguish hard from soft failures 2013-10-14 23:21:06 +02:00
define_imported.phpt Add test cases for conflicting use and definition in same ns (stas) 2013-08-23 23:31:17 +02:00
ignore_constants.phpt
no_conflict_with_classes.phpt Fix "already in use" check inconsistencies/bugs 2016-10-07 00:12:55 +02:00
no_global_fallback2.phpt Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
no_global_fallback.phpt Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
self_parent.phpt self and parent are valid function and const names (nikic) 2013-08-25 15:08:26 +02:00
shadow_core.phpt Disallow using functions/consts defined in the same file 2013-08-25 00:02:46 +02:00
shadow_global.phpt Disallow using functions/consts defined in the same file 2013-08-25 00:02:46 +02:00