From 6e3df00f62664a62538ab0c75401353b439bfb95 Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Wed, 22 May 2013 22:21:29 +0100 Subject: [PATCH] Removing broken Registry stuff (as registry is now deprecated in b8framework) - Fixes #58 --- PHPCI/Command/InstallCommand.php | 4 ++-- bootstrap.php | 2 ++ index.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/PHPCI/Command/InstallCommand.php b/PHPCI/Command/InstallCommand.php index 2549e5cc..18e600b4 100644 --- a/PHPCI/Command/InstallCommand.php +++ b/PHPCI/Command/InstallCommand.php @@ -62,8 +62,8 @@ b8\Database::setDetails('{$dbName}', '{$dbUser}', '{$dbPass}'); b8\Database::setWriteServers(array('{$dbHost}')); b8\Database::setReadServers(array('{$dbHost}')); -\$registry = b8\Registry::getInstance(); -\$registry->set('install_url', '{$ciUrl}'); +\$config = b8\Config::getInstance(); +\$config->set('install_url', '{$ciUrl}'); "; // Has the user entered Github app details? If so add those to config: diff --git a/bootstrap.php b/bootstrap.php index 4704260f..08fe30d7 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -37,6 +37,8 @@ require_once(APPLICATION_PATH . 'vendor/autoload.php'); // Load configuration if present: $config = new b8\Config(); +$request = new b8\Http\Request(); +$registry = new b8\Registry($config, $request); if (file_exists(APPLICATION_PATH . 'config.php')) { require(APPLICATION_PATH . 'config.php'); diff --git a/index.php b/index.php index 4f42e24f..cab4239d 100644 --- a/index.php +++ b/index.php @@ -14,5 +14,5 @@ ini_set('display_errors', 'on'); require_once('bootstrap.php'); -$fc = new PHPCI\Application(b8\Config::getInstance()); +$fc = new PHPCI\Application($config, $request); print $fc->handleRequest();