Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit bad2136

Browse files
committed
Updated to 1.2.0 version
1 parent 37c0152 commit bad2136

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 1.2.0 - 2018-02-25
4+
5+
* Some methods were modified to adapt them to the new version of Eliasis Framework.
6+
37
## 1.1.9 - 2018-01-06
48

59
* The tests were fixed.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
},
3232
"minimum-stability": "stable",
3333
"require": {
34-
"php": "^5.6 || ^7.0"
34+
"php": "^5.6 || ^7.0",
35+
"eliasis-framework/eliasis": "^1.1.3"
3536
},
3637
"require-dev": {
37-
"eliasis-framework/eliasis": "^1.1.1",
3838
"phpunit/phpunit": "^5.7 || ^6.0",
3939
"squizlabs/php_codesniffer": "^3.0",
4040
"friendsofphp/php-cs-fixer": "^2.3 || ^2.8",

src/Database.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,13 @@ public static function getConnection(
170170
return self::$conn[$id];
171171
}
172172

173-
if (class_exists($app = 'Eliasis\\App\\App')) {
174-
$provider = $provider ?: $app::get('db', $id, 'provider');
175-
$host = $host ?: $app::get('db', $id, 'host');
176-
$user = $user ?: $app::get('db', $id, 'user');
177-
$name = $name ?: $app::get('db', $id, 'name');
178-
$password = $password ?: $app::get('db', $id, 'password');
179-
$settings = $settings ?: $app::get('db', $id, 'settings');
173+
if (class_exists($app = 'Eliasis\\Framework\\App')) {
174+
$provider = $provider ?: $app::getOption('db', $id, 'provider');
175+
$host = $host ?: $app::getOption('db', $id, 'host');
176+
$user = $user ?: $app::getOption('db', $id, 'user');
177+
$name = $name ?: $app::getOption('db', $id, 'name');
178+
$password = $password ?: $app::getOption('db', $id, 'password');
179+
$settings = $settings ?: $app::getOption('db', $id, 'settings');
180180
}
181181

182182
return self::$conn[$id] = new self(

tests/ConnectionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
namespace Josantonius\Database;
1212

13-
use Eliasis\App\App;
13+
use Eliasis\Framework\App;
1414
use PHPUnit\Framework\TestCase;
1515

1616
/**
@@ -48,7 +48,7 @@ public function testGetConnectionFromEliasis()
4848
{
4949
App::run(dirname(__DIR__));
5050

51-
App::set('db', [
51+
App::setOption('db', [
5252
'Eliasis' => [
5353
'id' => 'Eliasis',
5454
'provider' => 'PDOprovider',

0 commit comments

Comments
 (0)