Skip to content

Commit

Permalink
Require Craft CMS 3.4 & phpdotenv 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
chasegiunta committed Feb 2, 2020
2 parents 704b68f + e4352a0 commit 88c153e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 21 deletions.
13 changes: 2 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,17 @@ ENVIRONMENT="dev"
# The secure key Craft will use for hashing and encrypting data
SECURITY_KEY=""

# The database driver that will be used ('mysql' or 'pgsql')
DB_DRIVER="mysql"

# The database server name or IP address (usually this is 'localhost' or '127.0.0.1')
DB_SERVER="localhost"
# The Data Source Name (“DSN”) that tells Craft how to connect to the database
DB_DSN=""

# The database username to connect with
DB_USER="root"

# The database password to connect with
DB_PASSWORD=""

# The name of the database to select
DB_DATABASE=""

# The database schema that will be used (PostgreSQL only)
DB_SCHEMA="public"

# The prefix that should be added to generated table names (only necessary if multiple things are sharing the same database)
DB_TABLE_PREFIX=""

# The port to connect to the database with. Will default to 5432 for PostgreSQL and 3306 for MySQL.
DB_PORT=""
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"issues": "https://github.com/chasegiunta/craft-vue/issues"
},
"require": {
"craftcms/cms": "^3.0.0",
"vlucas/phpdotenv": "^2.4.0",
"craftcms/cms": "^3.4.0",
"vlucas/phpdotenv": "^3.4.0",
"nystudio107/craft-twigpack": "^1.1"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions composer.json.default
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"require": {
"craftcms/cms": "^3.0.0",
"vlucas/phpdotenv": "^2.4.0"
"craftcms/cms": "^3.4.0",
"vlucas/phpdotenv": "^3.4.0"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 1 addition & 4 deletions config/db.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
*/

return [
'driver' => getenv('DB_DRIVER'),
'server' => getenv('DB_SERVER'),
'dsn' => getenv('DB_DSN'),
'user' => getenv('DB_USER'),
'password' => getenv('DB_PASSWORD'),
'database' => getenv('DB_DATABASE'),
'schema' => getenv('DB_SCHEMA'),
'tablePrefix' => getenv('DB_TABLE_PREFIX'),
'port' => getenv('DB_PORT')
];
2 changes: 1 addition & 1 deletion craft
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require_once CRAFT_VENDOR_PATH.'/autoload.php';

// Load dotenv?
if (class_exists('Dotenv\Dotenv') && file_exists(CRAFT_BASE_PATH.'/.env')) {
(new Dotenv\Dotenv(CRAFT_BASE_PATH))->load();
Dotenv\Dotenv::create(CRAFT_BASE_PATH)->load();
}

// Load and run Craft
Expand Down
2 changes: 1 addition & 1 deletion web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// Load dotenv?
if (class_exists('Dotenv\Dotenv') && file_exists(CRAFT_BASE_PATH.'/.env')) {
(new Dotenv\Dotenv(CRAFT_BASE_PATH))->load();
Dotenv\Dotenv::create(CRAFT_BASE_PATH)->load();
}

// Load and run Craft
Expand Down

0 comments on commit 88c153e

Please sign in to comment.