Skip to content

Commit

Permalink
remove DB checks and bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
alexweissman committed Mar 20, 2017
1 parent 5873cfb commit 9c9316b
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 28 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## v4.0.13-Alpha
- Update to RememberMe 2.0 (https://github.com/userfrosting/UserFrosting/issues/635)
- Remove database checks, as they are apparently no longer needed (https://github.com/userfrosting/UserFrosting/issues/655)
- Bump dependencies

## v4.0.12-Alpha
- Separate out the registration and sign-in pages (https://github.com/userfrosting/UserFrosting/issues/657) **BC**
- Slightly change behavior of form validation icons
Expand Down
2 changes: 1 addition & 1 deletion app/defines.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace UserFrosting;

// Some standard defines
define('UserFrosting\VERSION', '4.0.12-alpha');
define('UserFrosting\VERSION', '4.0.13-alpha');
define('UserFrosting\DS', '/');
define('UserFrosting\PHP_MIN_VERSION', '5.6');
define('UserFrosting\DEBUG_CONFIG', false);
Expand Down
6 changes: 3 additions & 3 deletions app/sprinkles/account/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"homepage": "https://alexanderweissman.com"
}
],
"version": "4.0.0",
"version": "4.0",
"require": {
"birke/rememberme" : "2.0.1",
"birke/rememberme" : "^2.0",
"nikic/php-parser" : "^1",
"php": ">=5.5.9"
"php": ">=5.6"
},
"autoload": {
"psr-4": {
Expand Down
11 changes: 1 addition & 10 deletions app/sprinkles/account/src/Authenticate/Authenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,8 @@ public function __construct(ClassMapper $classMapper, Session $session, $config)

// Initialize RememberMe storage
$this->rememberMeStorage = new RememberMePDO($this->config['remember_me.table']);

$dbParams = $this->config['db.default'];

// Test database connection directly using PDO
$dsn = "{$dbParams['driver']}:host={$dbParams['host']};dbname={$dbParams['database']}";
if (isset($dbParams['port'])) {
$dsn .= ";port={$dbParams['port']}";
}
$dbh = new \PDO($dsn, $dbParams['username'], $dbParams['password']);

// Now get actual PDO instance for Eloquent
// Get the actual PDO instance from Eloquent
$pdo = Capsule::connection()->getPdo();

$this->rememberMeStorage->setConnection($pdo);
Expand Down
4 changes: 2 additions & 2 deletions app/sprinkles/admin/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"homepage": "https://alexanderweissman.com"
}
],
"version": "4.0.0",
"version": "4.0",
"require": {
"php": ">=5.5.9"
"php": ">=5.6"
},
"autoload": {
"psr-4": {
Expand Down
12 changes: 6 additions & 6 deletions app/sprinkles/core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"homepage": "https://alexanderweissman.com"
}
],
"version": "4.0.0",
"version": "4.0",
"require": {
"illuminate/cache": "^5.2",
"illuminate/database": "^5.2",
"illuminate/events": "^5.2",
"illuminate/filesystem": "^5.2",
"illuminate/cache": "^5.3",
"illuminate/database": "^5.3",
"illuminate/events": "^5.3",
"illuminate/filesystem": "^5.3",
"league/csv": "^8.1",
"monolog/monolog": "^1",
"php": ">=5.5.9",
"php": ">=5.6",
"phpmailer/phpmailer": "5.2.10",
"rockettheme/toolbox": "1.3.1",
"slim/csrf": "^0.8",
Expand Down
2 changes: 1 addition & 1 deletion app/sprinkles/core/src/Util/CheckEnvironment.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,4 @@ public function isProduction()
{
return (getenv('UF_MODE') == 'production');
}
}
}
6 changes: 1 addition & 5 deletions migrations/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@

// Test database connection directly using PDO
try {
$dsn = "{$dbParams['driver']}:host={$dbParams['host']};dbname={$dbParams['database']}";
if (isset($dbParams['port'])) {
$dsn .= ";port={$dbParams['port']}";
}
$dbh = new \PDO($dsn, $dbParams['username'], $dbParams['password']);
Capsule::connection()->getPdo();
} catch (\PDOException $e) {
$message = PHP_EOL . "Could not connect to the database '{$dbParams['username']}@{$dbParams['host']}/{$dbParams['database']}'. Please check your database configuration and/or google the exception shown below:" . PHP_EOL;
$message .= "Exception: " . $e->getMessage() . PHP_EOL;
Expand Down

0 comments on commit 9c9316b

Please sign in to comment.