This template is based on the drupal-composer/drupal-project project template.
See https://github.com/wunderio/drupal-project#getting-started for Silta hosting environment settings.
- Install the latest Lando and read the documentation.
- Update your project name and other Lando Drupal 7 recipe's parameters at
.lando.yml
. - Define Drush site aliases at
drush/aliases.drushrc.php
& default remote environment at.lando/syncdb.sh
. - Run
lando start
. - Import data with
lando syncdb <remote>
orlando db-import <dumpfile>
.
- https://project.lndo.site, alias
@project.local
.
- https://adminer-project.lndo.site - Adminer for database management, log in without entering the credentials.
- https://mail-project.lndo.site - MailHog for mail management.
Full commands/tools overview is available at lando
. Custom tools:
lando build
- build the local site.lando npm
- run npm commands.lando node
- run Node.js commands.lando phpcs
,lando phpcbf
- use PHP_CodeSniffer:- Use Drupal & DrupalPractice standard for selected extensions:
lando phpcs --standard=Drupal,DrupalPractice web/sites/all/modules/contrib --extensions=php,inc,module,install
- Check
web/sites/all/modules/custom
folder for PHP 7.2 compatibility using PHPCompatibility standard:lando phpcs --standard=PHPCompatibility --extensions=php,inc,module,install --report-full=report_72.txt --runtime-set testVersion 7.2 -ps web/sites/all/modules/custom
.
- Use Drupal & DrupalPractice standard for selected extensions:
lando syncdb <remote>
- synchronize local database with selected remote environment (default /prod
).lando update
- apply required (database) updates.lando xdebug <mode>
- load Xdebug in the selected mode(s).
- Generate a raw composerfile of your old Drupal 7 project with
drush generate-makefile my.make
anddrush make-convert my.make --format=composer > raw-composer.json
. - Use the
require
list ofraw-composer.json
as a starting point for the requirements of the new projectcomposer.json
. Generate a new makefile, even if you already have one, to avoid problems with legacy issues. - Perform a requirements audit and remove / replace any legacy and unused components.
- Move custom modules / themes to either
web/sites/all/modules/custom
orweb/sites/all/themes/custom
, respectively. - Run PHP compliance tests with the
lando phpcs
tool and update the code if necessary. - Use the
registry_rebuild
module to fix project paths. - Enable
composer_autoloader
module.
See also drupal-composer/drupal-project readme for the overall advices.