Browse Source

Merge pull request #11605 from cakephp/deprecated-calls

Remove deprecated function calls
Mark Story 8 years ago
parent
commit
bf3fddd794
2 changed files with 5 additions and 4 deletions
  1. 4 3
      src/Console/CommandRunner.php
  2. 1 1
      src/ORM/Association/BelongsToMany.php

+ 4 - 3
src/Console/CommandRunner.php

@@ -22,16 +22,17 @@ use Cake\Console\ConsoleIo;
 use Cake\Console\Exception\StopException;
 use Cake\Console\Shell;
 use Cake\Core\ConsoleApplicationInterface;
-use Cake\Event\EventManagerTrait;
+use Cake\Event\EventDispatcherInterface;
+use Cake\Event\EventDispatcherTrait;
 use Cake\Utility\Inflector;
 use RuntimeException;
 
 /**
  * Run CLI commands for the provided application.
  */
-class CommandRunner
+class CommandRunner implements EventDispatcherInterface
 {
-    use EventManagerTrait;
+    use EventDispatcherTrait;
 
     /**
      * The application console commands are being run for.

+ 1 - 1
src/ORM/Association/BelongsToMany.php

@@ -784,7 +784,7 @@ class BelongsToMany extends Association
             // Saving the new linked entity failed, copy errors back into the
             // original entity if applicable and abort.
             if (!empty($options['atomic'])) {
-                $original[$k]->errors($entity->errors());
+                $original[$k]->setErrors($entity->getErrors());
             }
             if (!$saved) {
                 return false;