Skip to content
Browse files

Fix improper namespace for RuntimeException

Fix PHP Fatal error:  Class 'Phpmig\Console\Command\RuntimeException' not found
  • Loading branch information...
1 parent b838649 commit c000374e7da4f095714a121e20d04e6deabd34a6 @avidenie avidenie committed
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/Phpmig/Console/Command/AbstractCommand.php
View
10 src/Phpmig/Console/Command/AbstractCommand.php
@@ -93,7 +93,7 @@ protected function bootstrap(InputInterface $input, OutputInterface $output)
$container = $func();
if (!($container instanceof \ArrayAccess)) {
- throw new RuntimeException($bootstrap . " must return object of type \ArrayAccess");
+ throw new \RuntimeException($bootstrap . " must return object of type \ArrayAccess");
}
$this->setContainer($container);
@@ -101,13 +101,13 @@ protected function bootstrap(InputInterface $input, OutputInterface $output)
* Adapter
*/
if (!isset($container['phpmig.adapter'])) {
- throw new RuntimeException($bootstrap . " must return container with service at phpmig.adapter");
+ throw new \RuntimeException($bootstrap . " must return container with service at phpmig.adapter");
}
$adapter = $container['phpmig.adapter'];
if (!($adapter instanceof \Phpmig\Adapter\AdapterInterface)) {
- throw new RuntimeException("phpmig.adapter must be an instance of \Phpmig\Adapter\AdapterInterface");
+ throw new \RuntimeException("phpmig.adapter must be an instance of \Phpmig\Adapter\AdapterInterface");
}
if (!$adapter->hasSchema()) {
@@ -120,13 +120,13 @@ protected function bootstrap(InputInterface $input, OutputInterface $output)
* Migrations
*/
if (!isset($container['phpmig.migrations'])) {
- throw new RuntimeException($bootstrap . " must return container with array at phpmig.migrations");
+ throw new \RuntimeException($bootstrap . " must return container with array at phpmig.migrations");
}
$migrations = $container['phpmig.migrations'];
if (!is_array($migrations)) {
- throw new RuntimeException("phpmig.migrations must be an array of paths to migrations");
+ throw new \RuntimeException("phpmig.migrations must be an array of paths to migrations");
}
$versions = array();

0 comments on commit c000374

Please sign in to comment.
Something went wrong with that request. Please try again.