mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing more console classes
This commit is contained in:
parent
e3690ebccb
commit
b5122e6e81
8 changed files with 14 additions and 14 deletions
|
@ -18,8 +18,6 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
App::uses('Shell', 'Console');
|
||||
|
||||
/**
|
||||
* Shows a list of commands available from the console.
|
||||
*
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
include_once dirname(__FILE__) . DS . 'bake.php';
|
||||
App::uses('BakeTask', 'Console/Command/Task');
|
||||
App::uses('ConnectionManager', 'Model');
|
||||
|
||||
/**
|
||||
* Task class for creating and updating model files.
|
||||
|
@ -791,7 +792,6 @@ class ModelTask extends BakeTask {
|
|||
if (!isset($useDbConfig)) {
|
||||
$useDbConfig = $this->connection;
|
||||
}
|
||||
App::import('Model', 'ConnectionManager', false);
|
||||
|
||||
$db = ConnectionManager::getDataSource($useDbConfig);
|
||||
$useTable = Inflector::tableize($modelName);
|
||||
|
@ -820,7 +820,6 @@ class ModelTask extends BakeTask {
|
|||
if (!isset($useDbConfig)) {
|
||||
$useDbConfig = $this->connection;
|
||||
}
|
||||
App::import('Model', 'ConnectionManager', false);
|
||||
|
||||
$tables = array();
|
||||
$db = ConnectionManager::getDataSource($useDbConfig);
|
||||
|
|
|
@ -21,6 +21,7 @@ App::uses('TaskCollection', 'Console');
|
|||
App::uses('ConsoleOutput', 'Console');
|
||||
App::uses('ConsoleInput', 'Console');
|
||||
App::uses('ConsoleInputOption', 'Console');
|
||||
App::uses('ConsoleInputArgument', 'Console');
|
||||
App::uses('ConsoleOptionParser', 'Console');
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* @since CakePHP(tm) v 2.0
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
App::import('Core', 'String', false);
|
||||
App::import('String', 'Utility');
|
||||
|
||||
/**
|
||||
* HelpFormatter formats help for console shells. Can format to either
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
App::uses('TaskCollection', 'Console');
|
||||
App::uses('ConsoleOutput', 'Console');
|
||||
App::uses('ConsoleInput', 'Console');
|
||||
App::uses('ConsoleInputSubcommand', 'Console');
|
||||
App::uses('ConsoleOptionParser', 'Console');
|
||||
|
||||
/**
|
||||
|
|
|
@ -209,8 +209,11 @@ class ShellDispatcher {
|
|||
protected function _getShell($shell) {
|
||||
list($plugin, $shell) = pluginSplit($shell, true);
|
||||
|
||||
|
||||
$class = Inflector::camelize($shell) . 'Shell';
|
||||
$loaded = App::uses($class, $plugin . 'Console/Command');
|
||||
|
||||
App::uses('Shell', 'Console');
|
||||
App::uses($class, $plugin . 'Console/Command');
|
||||
|
||||
if (!class_exists($class)) {
|
||||
throw new MissingShellFileException(array('shell' => $shell));
|
||||
|
|
|
@ -61,10 +61,8 @@ class TaskCollection extends ObjectCollection {
|
|||
}
|
||||
$taskFile = Inflector::underscore($name);
|
||||
$taskClass = $name . 'Task';
|
||||
App::uses($taskClass, 'Console/Command/Task');
|
||||
if (!class_exists($taskClass)) {
|
||||
if (!App::import('Shell', $plugin . $this->taskPathPrefix . $name)) {
|
||||
throw new MissingTaskFileException($taskFile . '.php');
|
||||
}
|
||||
if (!class_exists($taskClass)) {
|
||||
throw new MissingTaskClassException($taskClass);
|
||||
}
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
/**
|
||||
* Included libs
|
||||
*/
|
||||
App::uses('ClassRegistry', 'Core');
|
||||
App::uses('Validation', 'Core');
|
||||
App::uses('String', 'Core');
|
||||
App::uses('ClassRegistry', 'Utility');
|
||||
App::uses('Validation', 'Utility');
|
||||
App::uses('String', 'Utility');
|
||||
App::uses('BehaviorCollection', 'Model');
|
||||
App::uses('ModelBehavior', 'Model');
|
||||
App::uses('ConnectionManager', 'Model');
|
||||
App::uses('Xml', 'Core');
|
||||
App::uses('Xml', 'Utility');
|
||||
|
||||
/**
|
||||
* Object-relational mapper.
|
||||
|
|
Loading…
Reference in a new issue