forked from drupal-composer/drupal-project
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge from upstream, fix scaffolding issue (#18)
* Honor .env files and suggest usage (drupal-composer#351) * Remove extra whitespace (drupal-composer#371) * Updated argument name * Bump minimal version * Bump minimal version to 8.5.3 * Fix installer path for drush commandfiles. * Composer lock from PHP 5.6 * Removing drupal-scaffold from the post-* commands
- Loading branch information
1 parent
6dbbd1d
commit 16c9bda
Showing
7 changed files
with
109 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Copy and rename this file to .env at root of this project. | ||
# | ||
|
||
# A common use case is to supply database creds via the environment. Edit settings.php | ||
# like so: | ||
# | ||
# $databases['default']['default'] = [ | ||
# 'database' => getenv('MYSQL_DATABASE'), | ||
# 'driver' => 'mysql', | ||
# 'host' => getenv('MYSQL_HOSTNAME'), | ||
# 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', | ||
# 'password' => getenv('MYSQL_PASSWORD'), | ||
# 'port' => getenv('MYSQL_PORT'), | ||
# 'prefix' => '', | ||
# 'username' => getenv('MYSQL_USER'), | ||
# ]; | ||
# | ||
# Uncomment and populate as needed. | ||
# MYSQL_DATABASE= | ||
# MYSQL_HOSTNAME= | ||
# MYSQL_PASSWORD= | ||
# MYSQL_PORT= | ||
# MYSQL_USER= | ||
|
||
# Another common use case is to set Drush's --uri via environment. | ||
# DRUSH_OPTIONS_URI=http://example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,6 @@ | |
|
||
# Ignore files generated by PhpStorm | ||
/.idea/ | ||
|
||
# Ignore .env files as they are personal | ||
/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
/** | ||
* This file is included very early. See autoload.files in composer.json and | ||
* https://getcomposer.org/doc/04-schema.md#files | ||
*/ | ||
|
||
use Dotenv\Dotenv; | ||
use Dotenv\Exception\InvalidPathException; | ||
|
||
/** | ||
* Load any .env file. See /.env.example. | ||
*/ | ||
$dotenv = new Dotenv(__DIR__); | ||
try { | ||
$dotenv->load(); | ||
} | ||
catch (InvalidPathException $e) { | ||
// Do nothing. Production environments rarely use .env files. | ||
} |