You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Acquia Drupal Recommended Settings plugin adds the recommended settings to the Drupal project, so developers won't have to edit settings.php manually.
2
+
The Acquia Drupal Recommended Settings plugin adds the recommended settings to
3
+
the Drupal project, so developers won't have to edit settings.php manually.
3
4
4
5
The recommended settings includes:
5
-
-the required database credentials
6
-
-configuration sync directory path.
7
-
- public/private etc. file directory path.
6
+
-The required database credentials.
7
+
-Configuration sync directory path.
8
+
-File directory path i.e public/private etc.
8
9
- Acquia site studio sync directory path.
9
-
- Includes Drupal module [Config sync without site uuid](https://www.drupal.org/project/config_sync_without_site_uuid) features.
10
10
11
-
It allows your websites to be easily installed in both Acquia Cloud IDE & local and deployable on Acquia Cloud.
11
+
It allows your websites to be easily installed in both Acquia Cloud IDE & local
12
+
and deployable on Acquia Cloud.
12
13
13
14
## Installation
14
15
@@ -18,43 +19,78 @@ You can also install this using Composer like so:
- Update `default.local.settings.php` and `local.settings.php` to use the Environment Detector provided by this plugin instead of BLT:
49
-
```diff
50
-
- use Acquia\Blt\Robo\Common\EnvironmentDetector;
51
-
+ use Acquia\Drupal\RecommendedSettings\Helpers\EnvironmentDetector;
57
+
use Acquia\Drupal\RecommendedSettings\Exceptions\SettingsException;
58
+
use Acquia\Drupal\RecommendedSettings\Settings;
59
+
60
+
// Create settings object.
61
+
$siteUri = "site1";
62
+
$settings = new Settings(DRUPAL_ROOT, $siteUri);
63
+
64
+
// Database details.
65
+
$dbSpec = [
66
+
'drupal' => [
67
+
'db' => [
68
+
'database' => 'drupal',
69
+
'username' => 'drupal',
70
+
'password' => 'drupal',
71
+
'host' => 'localhost',
72
+
'port' => '3306',
73
+
],
74
+
],
75
+
];
76
+
77
+
try {
78
+
// Call generate method passing database details.
79
+
$settings->generate($dbSpec);
80
+
} catch (SettingsException $e) {
81
+
echo $e->getMessage();
82
+
}
52
83
```
53
84
54
85
# License
55
86
56
87
Copyright (C) 2023 Acquia, Inc.
57
88
58
-
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
89
+
This program is free software: you can redistribute it and/or modify it under
90
+
the terms of the GNU General Public License version 2 as published by the
91
+
Free Software Foundation.
59
92
60
-
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
93
+
This program is distributed in the hope that it will be useful,
94
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
95
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
96
+
See the GNU General Public License for more details.
0 commit comments