This is a Drupal 9 (and 10) installation geared for local Core and Contrib development for use with Docksal.
Features:
- Core Drupal 9 repository for local contribution development
fin init
example- Using the default Docksal LAMP stack with image version pinning
- PHP and MySQL settings overrides examples
- Drush aliases example (
drush @docksal status
)
This is a one time setup - skip this if you already have a working Docksal environment.
Follow Docksal environment setup instructions
-
Clone this repo into your Projects directory
git clone https://github.com/docksal/drupal9-contrib.git drupal9 cd drupal9
-
Initialize the site
This will clone the core repository into
docroot
, initialize local settings and install the site via drushfin init
-
Point your browser to
http://drupal9.docksal
When the automated install is complete the command line output will display the admin username and password.
-
Find and issue, and create a local branch in the
docroot
folder:cd docroot git checkout -b 12345-short-description
where
12345
is the issue number, andshort-description
is just something to remind you of the issue. -
Apply the patch from the issue if it exists.
-
Run any relevant phpunit tests locally:
fin phpunit path/to/file/or/directory
for instance:
fin phpunit core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php
Note: it is not advisable to simply run
fin phpunit
as this will run all the core tests, which can take hours locally.
This repo is intended for local core contributions and includes a hardcoded value for hash_salt
in settings.php
.
You should not base your project off of this code base. If you do for whatever reason, make sure you regenerate and
update the hash_salt
value. A new value can be generated with drush ev '$hash = Drupal\Component\Utility\Crypt::randomBytesBase64(55); print $hash . "\n";'