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
* Add a core-version command.
* Add generated/provided comments
* Switch to using .env.
* Switch to .env.web for better scoping.
* Apply suggestions from code review
Co-authored-by: Moshe Weitzman <[email protected]>
* Test short-hand and invalid version constraints.
* mention new command list of comamnds in the in readme
---------
Co-authored-by: Moshe Weitzman <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ DDEV integration for developing Drupal contrib projects. As a general philosophy
15
15
3. cd [contrib module directory]
16
16
4. Configure DDEV for Drupal using `ddev config --project-type=drupal --docroot=web --php-version=8.3 --corepack-enable --project-name=[module]` or select these options when prompted using `ddev config`
17
17
- Remove underscores in the project name, or replace with hyphens. (DDEV will do this for you.)
18
-
- See [Misc](#misc) for help on using alternate versions of Drupal core.
18
+
- See [Changing the Drupal core version](#changing-the-drupal-core-version) to update your version of Drupal core.
19
19
5. Run `ddev add-on get ddev/ddev-selenium-standalone-chrome && ddev add-on get ddev/ddev-drupal-contrib`
20
20
6. Run `ddev start`
21
21
7. Run `ddev poser`
@@ -42,17 +42,14 @@ This project provides the following DDEV container commands.
42
42
- Runs `composer install` AND `yarn install` so that dependencies are available. Additional arguments to `ddev poser` like --prefer-source are passed along to `composer install`
43
43
- Note: it is perfectly acceptable to skip this command and edit the require-dev of composer.json by hand.
44
44
-[ddev symlink-project](https://github.com/ddev/ddev-drupal-contrib/blob/main/commands/web/symlink-project). Symlinks your project files into the configured location (defaults to `web/modules/custom`) so Drupal can find your module. This command runs automatically on every `ddev start`_as long as Composer has generated `vendor/autoload.php`_ which occurs during `composer install/update`. See codebase image below.
45
-
46
-
Run tests on your project code (defaults to `web/modules/custom`, [configurable](#changing-the-symlink-location)):
47
-
48
45
-`ddev phpunit` Run [PHPUnit](https://github.com/sebastianbergmann/phpunit) tests.
49
46
-`ddev nightwatch` Run Nightwatch tests, requires [DDEV Selenium Standalone Chrome](https://github.com/ddev/ddev-selenium-standalone-chrome).
50
47
-`ddev phpcs` Run [PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer).
51
48
-`ddev phpcbf` Fix phpcs findings.
52
49
-`ddev phpstan`. Run [phpstan](https://phpstan.org) on project files.
53
50
-`ddev eslint` Run [ESLint](https://github.com/eslint/eslint) on JavaScript files.
54
51
-`ddev stylelint` Run [Stylelint](https://github.com/stylelint/stylelint) on CSS files.
55
-
52
+
-`ddev core-version`. Update your codebase to newer or older version of Drupal core. [More info](#changing-the-drupal-core-version).
56
53
57
54
## Codebase layout
58
55
@@ -76,11 +73,16 @@ Override any environment variable value from [.ddev/config.contrib.yaml](config.
76
73
77
74
### Changing the Drupal core version
78
75
79
-
In `.ddev/config.local.yaml`set the Drupal core version:
76
+
Use the `ddev core-version` command to set the core version environment variable and update the dependencies, for example:
80
77
81
-
```yaml
82
-
web_environment:
83
-
- DRUPAL_CORE=^11
78
+
```shell
79
+
ddev core-version ^11
80
+
```
81
+
82
+
You can also do this manually by setting a version in `.ddev/.env.web`:
83
+
84
+
```ini
85
+
DRUPAL_CORE=^11
84
86
```
85
87
86
88
Then run `ddev restart` and then `ddev poser` to update the Drupal core version.
0 commit comments