Conversation
4.x: fix ci
update CI config
# Conflicts: # .github/workflows/ci.yml # tests/TestCase/DebugSqlTest.php
You should use namespaced |
As @garas said you need to use |
|
This would also mean I'd have to add the namespaced function for Especially since we made the global functions opt-in I'd still like to keep it the way it is right now since we only load those global functions for testing, not when the plugin is in use by an app. |
|
Hmm.. Right, having to add |
|
How about we automatically load the global functions in the rendering phase if they are not already present? |
|
For the app the global functions are already loaded by default https://github.com/cakephp/app/blob/5.x/config/bootstrap.php#L52 |
|
Yes, but what is the recommended way for plugin devs who use the global functions and tests which use them? |
|
Plugins should ideally use the namespaced functions. But when its not convenient to do so like for templates here, we could include just the Core/functions_global.php file. |
|
adjusted it now to use the specific global_functions files which are actually used. |
had to add
require_once CAKE . 'functions.php';to makeenv()available.Or should this be handled differently?