mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch '2.0' into 2.1
This commit is contained in:
commit
a2b6f18000
4 changed files with 12 additions and 3 deletions
|
@ -85,6 +85,7 @@ class CommandListShell extends Shell {
|
|||
$shellList = $this->_appendShells('CORE', $shells, $shellList);
|
||||
|
||||
$appShells = App::objects('Console/Command', null, false);
|
||||
$appShells = array_diff($appShells, $shells);
|
||||
$shellList = $this->_appendShells('app', $appShells, $shellList);
|
||||
|
||||
$plugins = CakePlugin::loaded();
|
||||
|
|
|
@ -353,6 +353,9 @@ class ExtractTask extends Shell {
|
|||
foreach ($models as $model) {
|
||||
App::uses($model, $plugin . 'Model');
|
||||
$reflection = new ReflectionClass($model);
|
||||
if (!$reflection->isSubClassOf('Model')) {
|
||||
continue;
|
||||
}
|
||||
$properties = $reflection->getDefaultProperties();
|
||||
$validate = $properties['validate'];
|
||||
if (empty($validate)) {
|
||||
|
|
|
@ -447,9 +447,6 @@ class App {
|
|||
|
||||
if (empty($path)) {
|
||||
$path = self::path($type, $plugin);
|
||||
if (empty($plugin)) {
|
||||
$path = array_merge($path, App::core($type));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ((array)$path as $dir) {
|
||||
|
|
|
@ -303,6 +303,14 @@ class AppTest extends CakeTestCase {
|
|||
$this->assertTrue(in_array('Dispatcher', $result));
|
||||
$this->assertTrue(in_array('Router', $result));
|
||||
|
||||
App::build(array(
|
||||
'Model/Behavior' => App::core('Model/Behavior'),
|
||||
'Controller' => App::core('Controller'),
|
||||
'Controller/Component' => App::core('Controller/Component'),
|
||||
'View' => App::core('View'),
|
||||
'Model' => App::core('Model'),
|
||||
'View/Helper' => App::core('View/Helper'),
|
||||
), App::RESET);
|
||||
$result = App::objects('behavior', null, false);
|
||||
$this->assertTrue(in_array('TreeBehavior', $result));
|
||||
$result = App::objects('Model/Behavior', null, false);
|
||||
|
|
Loading…
Reference in a new issue