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
Copy file name to clipboardExpand all lines: README.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
# DDEV Aljibe
7
7
8
8
## About Aljibe
9
-
Aljibe is an add-on for DDEV for Drupal projects that adds several tools quickly and easily, leaving a new project ready for development in a few minutes.
9
+
Aljibe is a DDEV add-on for Drupal projects that adds several tools quickly and easily, leaving a new project ready for development in a few minutes.
10
10
11
11
Aljibe extends DDEV by adding containers, configuration, and commands to make the development of Drupal projects faster and easier.
12
12
@@ -31,7 +31,7 @@ Aljibe extends DDEV by adding containers, configuration, and commands to make th
31
31
-[Drupal Updater](https://github.com/Metadrop/drupal-updater) to update Drupal core and contributed modules automatically
32
32
-[Utility to create artefacts](https://github.com/Metadrop/drupal-artifact-builder) for deployments
33
33
34
-
See [Aljibe: quality and testing for Drupal developments with DDEV](https://metadrop.net/en/articles/aljibe-quality-and-testing-drupal-developments-ddev) for a detailed introduction to Aljibe.
34
+
See [Aljibe: quality and testing for Drupal development with DDEV](https://metadrop.net/en/articles/aljibe-quality-and-testing-drupal-developments-ddev) for a detailed introduction to Aljibe.
35
35
36
36
37
37
> **Note:** This tool is based on DDEV, so any DDEV add-on can work with Aljibe. Discover available add-ons with `ddev add-on list` for official DDEV add-ons or `ddev add-on list --all` for all available add-ons.
@@ -77,35 +77,35 @@ Folders:
77
77
78
78
-`config`: contains exported Drupal site configuration.
79
79
-`drush`: contains Drush commands, configuration and site aliases.
80
-
-`patches`: contains patches applied to Composer dependencies. It is [recommended to download patches and commit them locally](https://www.drupal.org/docs/develop/using-composer/manage-dependencies#patches), and this folder is intended for storing those downloaded patches.
80
+
-`patches`: contains patches applied to Composer dependencies. It is [recommended to download patches and commit them locally](https://www.drupal.org/docs/develop/using-composer/manage-dependencies#patches). This folder is intended for storing those downloaded patches.
81
81
-`private-files`: contains private files for Drupal sites. Private files should not be stored in the web root for security reasons, so this folder is outside the web root.
82
-
-`recipes`: contains [recipes](https://www.drupal.org/docs/extending-drupal/drupal-recipes) for this project. Although recipes can be distributed as standard PHP packages, you can store here recipes specific to your project that are not intended to be shared.
83
-
-`scripts`: any custom scripts for your project can be stored here.
82
+
-`recipes`: contains [recipes](https://www.drupal.org/docs/extending-drupal/drupal-recipes) for this project. Although recipes can be distributed as standard PHP packages, you can store project-specific recipes here that are not intended to be shared.
83
+
-`scripts`: custom scripts for your project can be stored here.
84
84
85
85
86
86
87
87
### Static code analysis and linters
88
88
89
89
Aljibe provides several static code analysis tools and linters to help maintain high code quality.
90
90
91
-
Because there are many tools available, Aljibe uses two wrappers to manage them: GrumPHP and PHPQA.
91
+
Because many tools are available, Aljibe uses two wrappers to manage them: GrumPHP and PHPQA.
92
92
93
-
GrumPHP is run automatically on each Git commit while PHPQA is intended to be run manually or by your CI/CD system. Because both uses the same underlying tools, they are configured similarly to ensure consistent results. Be sure to modify both configurations if you want to change the behaviour of any tool.
93
+
GrumPHP runs automatically on each Git commit, while PHPQA is intended to be run manually or by your CI/CD system. Because both use the same underlying tools, they are configured similarly to ensure consistent results. Be sure to modify both configurations if you want to change the behaviour of any tool.
94
94
95
95
#### GrumPHP
96
96
97
-
GrumPHP runs code quality checks automatically on each Git commit. Aljibe configures GrumPHP with several tools and checks out of the box, including Git message check, Git branch name, file sizes, PHPStan, PHP_CodeSniffer with Drupal standards, PHPMD, and various linters.
97
+
GrumPHP runs code quality checks automatically on each Git commit. Aljibe configures GrumPHP with several tools and checks by default, including Git message check, Git branch name, file sizes, PHPStan, PHP_CodeSniffer with Drupal standards, PHPMD, and various linters.
98
98
99
-
To customise it please refer to your project's `.grumphp.yml` file. This file is provided by Aljibe during installation, but you can modify it to suit your project's needs.
99
+
To customise it, refer to your project's `.grumphp.yml` file. This file is provided by Aljibe during installation, but you can modify it to suit your project's needs.
100
100
101
101
102
102
#### PHPQA
103
103
104
-
PHPQA is a wrapper that allows you to run multiple PHP static analysis tools with a single command. Aljibe configures PHPQA to run out of the box the following tools: PHP_CodeSniffer with Drupal standards, PHPMD and PHP Parallel Lint.
104
+
PHPQA is a wrapper that allows you to run multiple PHP static analysis tools with a single command. Aljibe configures PHPQA to run the following tools by default: PHP_CodeSniffer with Drupal standards, PHPMD and PHP Parallel Lint.
105
105
106
106
PHPQA is intended to be run manually or by your CI/CD system.
107
107
108
-
To customise it please refer to your project's `.phpqa.xml` file. This file is provided by Aljibe during installation, but you can modify it to suit your project's needs.
108
+
To customise it, refer to your project's `.phpqa.xml` file. This file is provided by Aljibe during installation, but you can modify it to suit your project's needs.
109
109
110
110
111
111
### Behat testing (BDD/acceptance testing)
@@ -114,14 +114,14 @@ Behat is a Behaviour-Driven Development (BDD) framework for PHP. Aljibe includes
114
114
115
115
Behat is integrated with Drupal thanks to [Drupal Extension](https://www.drupal.org/project/drupalextension).
116
116
117
-
Aljibe includes two environments for Behat tests: `local` and `pro` (production). You can add more environments by creating additional folders inside `tests/behat/`.
117
+
Aljibe includes two Behat test environments: `local` and `pro` (production). You can add more environments by creating additional folders inside `tests/behat/`.
118
118
119
-
-`local`: for local and CI/CD tests. This environment is the one provided by DDEV.
119
+
-`local`: for local and CI/CD tests. This environment uses the DDEV local instance.
120
120
-`pro`: for production environment testing (usually smoke tests). This environment is intended to run tests against the live production site. Behat tests in this environment should be non-destructive and safe to run against a live site. They should be short and not intensive, focusing on critical functionality to ensure the site is operational.
121
121
122
122
The `tests/common` folder contains shared features that are run on all environments.
123
123
124
-
All provided Behat features (Behat tests) should pass after Aljibe is installed. Look for files with the `.example` extension inside `tests/behat/` folders. These features usually require some Drupal modules or configuration and are not included by default to avoid having tests failing out of the box. If you want them, remove the `.example` extension and adapt them to your project.
124
+
All provided Behat features (test scenarios) should pass after Aljibe is installed. Look for files with the `.example` extension inside `tests/behat/` folders. These features usually require some Drupal modules or configuration and are not included by default to avoid having tests failing out of the box. If you want them, remove the `.example` extension and adapt them to your project.
125
125
126
126
#### Running Behat
127
127
@@ -148,7 +148,7 @@ ddev behat local --tags=@mytag
148
148
See [Behat Command Line Tool](https://docs.behat.org/en/latest/user_guide/command_line_tool.html) for more information.
149
149
150
150
151
-
Keep into account that `behat` command already adds the path to the configuration
151
+
Note that the `behat` command already includes the path to the configuration file
152
152
153
153
154
154
#### Behat contexts
@@ -160,7 +160,7 @@ Behat contexts are PHP classes that define the steps used in Behat features. Alj
160
160
161
161
[BackstopJS](https://garris.github.io/BackstopJS/) is a tool for visual regression testing. Aljibe includes BackstopJS integration to help you catch visual changes in your Drupal site.
162
162
163
-
By default, Aljibe provides two BackstopJS environments: `local` and `pro` (production). You can add more environments by creating additional folders inside `tests/backstopjs/`.
163
+
Aljibe provides two BackstopJS environments by default: `local` and `pro` (production). You can add more environments by creating additional folders inside `tests/backstopjs/`.
164
164
165
165
-`local`: for local and CI/CD tests. This environment is the one provided by DDEV.
166
166
-`pro`: for production environment testing (usually smoke tests). This environment is intended to run tests against the live production site. BackstopJS tests in this environment should fast and not intensive, focusing on critical pages to ensure the site is visually correct.
@@ -228,11 +228,11 @@ This feature is provided by a separate [DDEV add-on](https://addons.ddev.com/add
228
228
229
229
### Website quality audits with Unlighthouse
230
230
231
-
Unlighthouse is a tool for auditing website quality, performance, SEO, and accessibility. It used Lighthouse under the hood to perform these audits.
231
+
Unlighthouse is a tool for auditing website quality, performance, SEO, and accessibility. It uses Lighthouse under the hood to perform these audits.
232
232
233
233
Aljibe includes Unlighthouse integration to help you maintain high-quality websites.
234
234
235
-
Unlightouse is able to autodiscover site's URLs and follow a sitemap.
235
+
Unlighthouse can autodiscover site URLs and follow a sitemap.
236
236
237
237
To run it against your local site, use the following command:
238
238
@@ -293,9 +293,9 @@ Aljibe aims to ease site management tasks with several provided commands.
293
293
294
294
#### Site installation
295
295
296
-
First, make easy to install a site to start developing from a known base. The command `site-install` installs a site using either a configuration export or a database dump.
296
+
First, Aljibe makes it easy to install a site from a known base to start development. The command `site-install` installs a site using either a configuration export or a database dump.
297
297
298
-
During development workflow is common to configure the local development site with a known setup for testing and development. Many times this is done using a database dump from a staging or production server.
298
+
During development, it is common to configure the local site with a known setup for testing and development. Many times this is done using a database dump from a staging or production server.
299
299
300
300
Another option is to use a configuration export to set up the site, and use default content to populate the site with content to be able to test functionalities. This is the recommended way when working with Drupal projects that have a complete configuration management workflow, because it allows predictable setup times, avoid any privacy issues with real data (no need for sanitisation) and is usually faster than importing a database dump.
301
301
@@ -308,7 +308,7 @@ To install the default site from the configuration export, run:
308
308
ddev site-install
309
309
```
310
310
311
-
For this to work, a Drupal configuration export must be available. The command uses drush commands (`sql-drop`, `site:install` and `config-import`) to perform the installation from existing configuration.
311
+
For this to work, a Drupal configuration export must be available. The command uses Drush commands (`sql-drop`, `site:install` and `config-import`) to perform the installation from existing configuration.
312
312
313
313
To install a different site other than the default, use its site name:
314
314
@@ -331,36 +331,36 @@ Run the following command to install a site from a database dump:
331
331
ddev site-install site1 path/to/dump.sql # Installs @site1.local using the provided database dump
332
332
```
333
333
334
-
In this case, th site name is mandatory, as well as the path to the database dump file.
334
+
In this case, the site name is mandatory, as well as the path to the database dump file.
335
335
336
336
337
337
##### Fast on-boarding
338
338
339
339
The `setup` commands allow for fast on-boarding of new developers by automating the site installation process. A new developer only needs to clone the project repository and run `ddev setup` to have a working local site ready for development.
340
340
341
-
The `setup` command takes care of installing Composer dependencies, install the site (or sites in a multisite setup) using `site-install`.
341
+
The `setup` command installs Composer dependencies and installs the site (or sites in a multisite setup) using `site-install`.
342
342
343
343
This command currently supports only installation from configuration exports.
344
344
345
345
346
346
347
347
#### Hooking into the setup and site installation process
348
348
349
-
Both commands, `setup` and `site-install`, provide hooks to allow you to run custom commands at different stages of the process. This is useful to perform additional setup task if your project requires special steps.
349
+
Both commands, `setup` and `site-install`, provide hooks to allow you to run custom commands at different stages of the process. This is useful for performing additional setup tasks if your project requires special steps.
350
350
351
351
Check [hooks](#hooks) configuration property of `.ddev/aljibe.yml` file for more information about available hooks and how to use them.
352
352
353
353
354
354
### Multisite support
355
355
356
-
Aljibe supports multisite setups thanks to Drush aliases. Some commands allow to select the site using a Drush aliases, while other command require you to provide the right configuration.
356
+
Aljibe supports multisite setups using Drush aliases. Some commands allow you to select the site using Drush aliases, while others require you to provide the appropriate configuration.
357
357
358
-
For example, use different Behat profiles for different sites. Or provide absolute URL to BackstopJS or Pa11y commands. Or use the site name in the `site-install` command.
358
+
For example, use different Behat profiles for different sites, or provide absolute URLs to BackstopJS or Pa11y commands, or use the site name in the `site-install` command.
359
359
360
360
361
361
### Utility commands
362
362
363
-
Some commands are provided ease certain operations:
363
+
Some commands are provided to ease certain operations:
364
364
365
365
-`ddev all-sites-drush`: run a Drush command on all sites in the multisite installation.
366
366
-`ddev create-database`: create secondary databases. This is useful if your site requires another database, or when you are adding a new site to your project and you need to create its database.
When deploying a Drupal site often is recommended to create artefacts that can be deployed to the production server. These artefacts include only the necessary files for the site to run, excluding development dependencies and unnecessary files.
384
+
When deploying a Drupal site, it is often recommended to create artefacts that can be deployed to the production server. These artefacts include only the necessary files for the site to run, excluding development dependencies and unnecessary files.
385
385
386
386
Aljibe includes [Drupal Artefact Builder](https://github.com/Metadrop/drupal-artifact-builder), a tool to create Drupal artefacts for deployments from the current state of the codebase.
0 commit comments