mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
64700e9a08
Previously the Shell::helper() function would call a `class_exists` on a variable that contained the `Plugin.ClassName` notation which will always result be false, e.g. `class_exists('YourPlugin.TestShellHelper')` will always be false. Loading ShellHelpers from a plugin will never work because of this. (This notation is described in the ShellHelper 2.x documentation). After the pluginSplit and the loading of the actual ShellHelper class file (through `App::uses`), the `class_exists` should be called on the real class name, not on `Plugin.ClassName`. Through this fix, plugins with an ExampleShellHelper in placed in MyPlugin/Console/Helper/ExampleShellHelper.php can be called in Shells by `$this->helper('MyPlugin.ExampleShellHelper')` and plugins within your app can still be loaded through the regular `$this->helper('MyShellHelper')`. |
||
---|---|---|
.. | ||
Command | ||
Helper | ||
Templates | ||
cake | ||
cake.bat | ||
cake.php | ||
ConsoleErrorHandler.php | ||
ConsoleInput.php | ||
ConsoleInputArgument.php | ||
ConsoleInputOption.php | ||
ConsoleInputSubcommand.php | ||
ConsoleOptionParser.php | ||
ConsoleOutput.php | ||
HelpFormatter.php | ||
Shell.php | ||
ShellDispatcher.php | ||
TaskCollection.php |