diff --git a/module/VuFind/config/module.config.php b/module/VuFind/config/module.config.php index c4ece74f728dc61c0c7055266f4005212314134d..5333d7a722b277e07c8861c4536ef2bddbf72e7f 100644 --- a/module/VuFind/config/module.config.php +++ b/module/VuFind/config/module.config.php @@ -279,7 +279,7 @@ $config = array( ), 'service_manager' => array( 'factories' => array( - 'dbadapter' => function ($sm) { + 'VuFind\DbAdapter' => function ($sm) { return \VuFind\Db\AdapterFactory::getAdapter(); }, 'ilsconnection' => function ($sm) { diff --git a/module/VuFind/src/VuFind/Controller/UpgradeController.php b/module/VuFind/src/VuFind/Controller/UpgradeController.php index 2cdb84c913515a7c17fdc83570ffe8ac6f61b364..3b92eec6306a710c16e924fd92fbe622afed518a 100644 --- a/module/VuFind/src/VuFind/Controller/UpgradeController.php +++ b/module/VuFind/src/VuFind/Controller/UpgradeController.php @@ -201,7 +201,7 @@ class UpgradeController extends AbstractBase try { // Set up the helper with information from our SQL file: $this->dbUpgrade() - ->setAdapter($this->getServiceLocator()->get('DBAdapter')) + ->setAdapter($this->getServiceLocator()->get('VuFind\DbAdapter')) ->loadSql(APPLICATION_PATH . '/module/VuFind/sql/mysql.sql'); // Check for missing tables. Note that we need to finish dealing with diff --git a/module/VuFind/src/VuFind/Db/Row/User.php b/module/VuFind/src/VuFind/Db/Row/User.php index 81adc1ea71c9ba5a83aee7d6d27f20d61f5269e7..14d5191e2cfa753662ff3f3ef8829005f78006ab 100644 --- a/module/VuFind/src/VuFind/Db/Row/User.php +++ b/module/VuFind/src/VuFind/Db/Row/User.php @@ -80,7 +80,7 @@ class User extends ServiceLocatorAwareGateway // reconnect to the database as part of the save action to prevent // exceptions: $this->sql = new Sql( - $this->getServiceLocator()->getServiceLocator()->get('DBAdapter'), + $this->getServiceLocator()->getServiceLocator()->get('VuFind\DbAdapter'), $this->table ); return parent::save(); diff --git a/module/VuFind/src/VuFind/Db/Table/PluginManager.php b/module/VuFind/src/VuFind/Db/Table/PluginManager.php index f301668be7f3e788e591691b2af00cd253354242..346b028350b34ff41a0f377dd933419729e9683b 100644 --- a/module/VuFind/src/VuFind/Db/Table/PluginManager.php +++ b/module/VuFind/src/VuFind/Db/Table/PluginManager.php @@ -50,7 +50,8 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager ) { parent::__construct($configuration); $initializer = function ($instance, $manager) { - $instance->setAdapter($manager->getServiceLocator()->get('DBAdapter')); + $instance + ->setAdapter($manager->getServiceLocator()->get('VuFind\DbAdapter')); $instance->initialize(); }; $this->addInitializer($initializer, false); diff --git a/module/VuFind/src/VuFind/Log/Logger.php b/module/VuFind/src/VuFind/Log/Logger.php index b1bd5f5d32c00d160f1ecf750f61031d8c6928dc..ef5ddb73577a05440ceab08fcf6d0a3dbb845ed2 100644 --- a/module/VuFind/src/VuFind/Log/Logger.php +++ b/module/VuFind/src/VuFind/Log/Logger.php @@ -94,7 +94,7 @@ class Logger extends BaseLogger implements ServiceLocatorAwareInterface // Make Writers $filters = explode(',', $error_types); $writer = new Writer\Db( - $this->getServiceLocator()->get('DBAdapter'), + $this->getServiceLocator()->get('VuFind\DbAdapter'), $table_name, $columnMapping ); $this->addWriters($writer, $filters); diff --git a/module/VuFind/src/VuFindTest/Unit/DbTestCase.php b/module/VuFind/src/VuFindTest/Unit/DbTestCase.php index 08121c7f2e66337198c6a0a74d1a3ab0323e2f1f..a05f9f3c5ec07470cec7eb7fdbd5e81a5f55b48c 100644 --- a/module/VuFind/src/VuFindTest/Unit/DbTestCase.php +++ b/module/VuFind/src/VuFindTest/Unit/DbTestCase.php @@ -52,7 +52,9 @@ abstract class DbTestCase extends TestCase // Add database service: if (!$sm->has('VuFind\DbTablePluginManager')) { - $sm->setService('DBAdapter', \VuFind\Db\AdapterFactory::getAdapter()); + $sm->setService( + 'VuFind\DbAdapter', \VuFind\Db\AdapterFactory::getAdapter() + ); $factory = new \VuFind\Db\Table\PluginManager( new \Zend\ServiceManager\Config( array(