Skip to content
/ drupal7-project Public template

Wunder Drupal 7 + Composer + Lando project template

Notifications You must be signed in to change notification settings

wunderio/drupal7-project

Repository files navigation

Drupal 7 + Composer + Lando project template

CircleCI

This template is based on the drupal-composer/drupal-project project template.

Silta hosting environment

See https://github.com/wunderio/drupal-project#getting-started for Silta hosting environment settings.

Local environment

  1. Install the latest Lando and read the documentation.
  2. Update your project name and other Lando Drupal 7 recipe's parameters at .lando.yml.
  3. Define Drush site aliases at drush/aliases.drushrc.php & default remote environment at .lando/syncdb.sh.
  4. Run lando start.
  5. Import data with lando syncdb <remote> or lando db-import <dumpfile>.

Local sites

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.
  • 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).

How to convert an old Drush make project into this project template

  1. Generate a raw composerfile of your old Drupal 7 project with drush generate-makefile my.make and drush make-convert my.make --format=composer > raw-composer.json.
  2. Use the require list of raw-composer.json as a starting point for the requirements of the new project composer.json. Generate a new makefile, even if you already have one, to avoid problems with legacy issues.
  3. Perform a requirements audit and remove / replace any legacy and unused components.
  4. Move custom modules / themes to either web/sites/all/modules/custom or web/sites/all/themes/custom, respectively.
  5. Run PHP compliance tests with the lando phpcs tool and update the code if necessary.
  6. Use the registry_rebuild module to fix project paths.
  7. Enable composer_autoloader module.

See also drupal-composer/drupal-project readme for the overall advices.

About

Wunder Drupal 7 + Composer + Lando project template

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •