- PHP >= 5.6
- Composer
- VMware >= 8.0 or VirtualBox >= 5.0
- ansible >= 2.0
- vagrant >= 1.8
- Vagrant plugins:
This environment is supported under Mac OS X >= 10.10. This stack quite possibly runs under other host operating systems, but is not regularly tested. For details on installing these dependencies on your Mac, see our Mac setup development documentation.
- From inside the project root, run:
composer install
vagrant up
- You will be prompted for the administration password on your host machine. Obey.
- SSH in and install the site:
vagrant ssh
cd /var/www/slicklabs.local
vendor/bin/phing build install
- Visit drupal-skeleton.local in your browser of choice.
- From inside the project root, type
vagrant ssh
- Navigate to
/var/www/slick.local
- Build, install, migrate, and test:
vendor/bin/phing build install migrate test
This is your project directory; run composer
and drush
commands from here, and run build tasks with vendor/bin/phing
.
This project uses Composer Installers, DrupalScaffold, and the-build to assemble our Drupal root in web
. Dig into web
to find the both contrib Drupal code (installed by composer) and custom Drupal code (included in the git repository).
You can run drush
commands from anywhere within the repository, as long as you are ssh'ed into the vagrant.
Run composer install && vendor/bin/phing build install
- Download modules with composer:
composer require drupal/bad_judgement:^8.1
- Enable the module:
drush en bad_judgement
- Export the config with the module enabled:
drush config-export
- Commit the changes to
composer.json
,composer.lock
, andconf/drupal/config/core.extension.yml
. The module code itself will be excluded by the project's.gitignore
.
Sometimes we need to apply patches from the Drupal.org issue queues. These patches should be applied using composer using the Composer Patches composer plugin.
Sometimes it is appropriate to configure specific Drupal variables in Drupal's settings.php
file. Our settings.php
file is built from a template found at conf/drupal/settings.php
during the phing build.
- Add your appropriately named values to
conf/build.default.properties
(likedrupal.my_setting=example
) - Update
conf/drupal/settings.php
to use your new variable (like$conf['my_setting'] = '${drupal.my_setting}';
) - Run
vendor/bin/phing build
- Test
- If the variable requires different values in different environments, add those to the appropriate properties files (
conf/build.vagrant.properties
,conf/build.circle.properties
,conf/build.acquia.properties
). Note that you may reference environment variables withdrupal.my_setting=${env.DRUPAL_MY_SETTING}
. - Finally, commit your changes.
Run vendor/bin/phing test
or vendor/bin/behat features/installation.feature
.
If, on browsing to http://slicklabs.local
, you get the following error:
slicklabs.local’s server DNS address could not be found.
Then vagrant up
may have failed half way through. When this happens, the vagrant-hostmanager
plugin does not add the hostname to /etc/hosts
. Try halting and re-upping the machine: vagrant halt && vagrant up
. Reload is not sufficient to trigger updating the hosts file.