Skip to content

Commit 88c153e

Browse files
committed
Require Craft CMS 3.4 & phpdotenv 3.4
2 parents 704b68f + e4352a0 commit 88c153e

File tree

6 files changed

+9
-21
lines changed

6 files changed

+9
-21
lines changed

.env.example

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,17 @@ ENVIRONMENT="dev"
44
# The secure key Craft will use for hashing and encrypting data
55
SECURITY_KEY=""
66

7-
# The database driver that will be used ('mysql' or 'pgsql')
8-
DB_DRIVER="mysql"
9-
10-
# The database server name or IP address (usually this is 'localhost' or '127.0.0.1')
11-
DB_SERVER="localhost"
7+
# The Data Source Name (“DSN”) that tells Craft how to connect to the database
8+
DB_DSN=""
129

1310
# The database username to connect with
1411
DB_USER="root"
1512

1613
# The database password to connect with
1714
DB_PASSWORD=""
1815

19-
# The name of the database to select
20-
DB_DATABASE=""
21-
2216
# The database schema that will be used (PostgreSQL only)
2317
DB_SCHEMA="public"
2418

2519
# The prefix that should be added to generated table names (only necessary if multiple things are sharing the same database)
2620
DB_TABLE_PREFIX=""
27-
28-
# The port to connect to the database with. Will default to 5432 for PostgreSQL and 3306 for MySQL.
29-
DB_PORT=""

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"issues": "https://github.com/chasegiunta/craft-vue/issues"
1919
},
2020
"require": {
21-
"craftcms/cms": "^3.0.0",
22-
"vlucas/phpdotenv": "^2.4.0",
21+
"craftcms/cms": "^3.4.0",
22+
"vlucas/phpdotenv": "^3.4.0",
2323
"nystudio107/craft-twigpack": "^1.1"
2424
},
2525
"autoload": {

composer.json.default

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"require": {
3-
"craftcms/cms": "^3.0.0",
4-
"vlucas/phpdotenv": "^2.4.0"
3+
"craftcms/cms": "^3.4.0",
4+
"vlucas/phpdotenv": "^3.4.0"
55
},
66
"autoload": {
77
"psr-4": {

config/db.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@
99
*/
1010

1111
return [
12-
'driver' => getenv('DB_DRIVER'),
13-
'server' => getenv('DB_SERVER'),
12+
'dsn' => getenv('DB_DSN'),
1413
'user' => getenv('DB_USER'),
1514
'password' => getenv('DB_PASSWORD'),
16-
'database' => getenv('DB_DATABASE'),
1715
'schema' => getenv('DB_SCHEMA'),
1816
'tablePrefix' => getenv('DB_TABLE_PREFIX'),
19-
'port' => getenv('DB_PORT')
2017
];

craft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require_once CRAFT_VENDOR_PATH.'/autoload.php';
1313

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

1919
// Load and run Craft

web/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

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

1818
// Load and run Craft

0 commit comments

Comments
 (0)