mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix failing tests caused by changes in App::objects()
This commit is contained in:
parent
a7d08a6b39
commit
cfe38985cf
2 changed files with 4 additions and 0 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)) {
|
||||
|
|
Loading…
Reference in a new issue