Skip to content

Commit d403f15

Browse files
Fixed Dotenv::getSettings to use Drupal's standard-fare development.services.yml if a dev environment. Updating change log & documentation.
1 parent e1cb790 commit d403f15

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) princi
44

55
## [Unreleased][unreleased]
66

7+
## [0.1.9] - 2021-12-29
8+
9+
### Fixed
10+
11+
- Fixed `Dotenv::getSettings` to use Drupal's standard-fare `development.services.yml` if a `dev` environment.
12+
713
## [0.1.8] - 2021-12-14
814

915
### Fixed
@@ -64,8 +70,9 @@ Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) princi
6470

6571
**Initial release!**
6672

67-
[unreleased]: https://github.com/unleashedtech/dotenv-drupal/compare/0.1.8...main
68-
[0.1.7]: https://github.com/unleashedtech/dotenv-drupal/compare/0.1.7...0.1.8
73+
[unreleased]: https://github.com/unleashedtech/dotenv-drupal/compare/0.1.9...main
74+
[0.1.9]: https://github.com/unleashedtech/dotenv-drupal/compare/0.1.8...0.1.9
75+
[0.1.8]: https://github.com/unleashedtech/dotenv-drupal/compare/0.1.7...0.1.8
6976
[0.1.7]: https://github.com/unleashedtech/dotenv-drupal/compare/0.1.6...0.1.7
7077
[0.1.6]: https://github.com/unleashedtech/dotenv-drupal/compare/0.1.5...0.1.6
7178
[0.1.5]: https://github.com/unleashedtech/dotenv-drupal/compare/0.1.4...0.1.5

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,6 @@ Streamlined environment-dependent configuration of _one_ Solr core is supported
146146

147147
#### Configuration Conclusion
148148
With these few Environment Variables, you will be able to configure Drupal in a streamlined
149-
fashion similar to the way Symfony is configured. Support for integration of many more common
150-
integrations can be expected soon. Please consider creating a Pull Request with integration(s)
151-
you would like to see added.
149+
fashion similar to the way Symfony is configured. Support for many more common Drupal features
150+
can be expected soon. Please consider creating a Pull Request with features you would like to
151+
this package to support.

src/Dotenv.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,14 @@ public function getSettings(): array
192192
$settings['config_sync_directory'] = $this->getConfigSyncPath();
193193
$settings['file_public_path'] = $this->getPublicFilePath();
194194
$settings['file_private_path'] = $this->getPrivateFilePath();
195-
$settings['container_yamls'] = [
196-
$this->getAppPath() . '/sites/' . $envName . '.services.yml',
197-
];
198195
if (isset($_SERVER['HASH_SALT'])) {
199196
$settings['hash_salt'] = $_SERVER['HASH_SALT'];
200197
}
201198
switch ($envName) {
202199
case 'dev':
200+
$settings['container_yamls'] = [
201+
$this->getAppPath() . '/sites/development.services.yml',
202+
];
203203
$settings['cache']['bins'] = [
204204
'render' => 'cache.backend.null',
205205
'page' => 'cache.backend.null',
@@ -214,6 +214,12 @@ public function getSettings(): array
214214
}
215215
$settings['skip_permissions_hardening'] = TRUE;
216216
$settings['update_free_access'] = FALSE;
217+
break;
218+
219+
default:
220+
$settings['container_yamls'] = [
221+
$this->getAppPath() . '/sites/' . $envName . '.services.yml',
222+
];
217223
}
218224
$this->decorate($settings, 'settings');
219225
return $settings;

0 commit comments

Comments
 (0)