Skip to content
Snippets Groups Projects
Chris Shantz's avatar
Chris Shantz authored
ISTWCMS-4233: Add Lando PHPCS command (once it is added to profile)

See merge request !1
5206a54e
History
Name Last commit Last update
wcms
.gitignore
.lando.yml
README.md

WCMS Lando setup

This repository contains all you will need to get up and running with Lando and the WCMS 3.x.

Setup the Dev environment with Lando

Requirements

(There may be others that I am currently missing...)

Setup

Clone repo (https://git.uwaterloo.ca/mnshantz/wcms-lando.git)

Go into the wcms-lando directory.

 cd wcms-lando

Since you don't need to commit back to the Lando repo we can remove that ability.

 git remote remove origin

Now we can start Lando.

 lando start

We can then run the WCMS rebuild script within Lando, this runs ./rebuild.sh, you will be presented with prompts. In most cases the defaults are fine.

 lando wcms-rebuild

I've created a database to get things started, you can import it using this command.

 lando db-import wcms/wcms-lando.sql.gz

Finally, we clear caches within our sites folder so things are tickety-boo!

 lando wcms-cr

Go to your site URL (which should be located at https://wcms.lndo.site/) Otherwise run

 lando info

To get the URL for your site. You should see the WCMS site with the correct header and footer. Login is:

  • username: wcmsadmin
  • password: 12345

To run gulp watch on the Gesso folder:

 lando wcms-gulp

If you need to get rid of your Lando instance:

 lando destroy -y

Also, remember you need to clean up (remove) any files that were created as part of the lando start command, or you can just delete and re-clone the folder.

Using xdebug with Lando and PHPStorm

Note This assumes you already have Lando and PHPstorm installed, and that you have downloaded and installed the required Xdebug plugin for your web browser of choice.

Running xdebug in Lando can cause a performance hit. To enable or disable xdebug you need to change run

 lando xdebug-on

or

 lando xdebug-off

The default state is currently off.

Once you have you site (re)built, start PHPStorm.

  1. Going to Preferences -> Languages & Frameworks -> PHP and make sure that the PHP language level matches the .lando.yml file, currently (May 2020) set to PHP 7.3.

  2. Make sure that you have your Project opened in PHPStorm.

  3. Add a breakpoint in your desired module.

  4. Open your browser and go to the URL of the lando site, if you are using the defaults it should be https://wcms.lndo.site

  5. Make sure you've installed the Xdebug plugin for your browser and enable debugging on your lando site.

  6. Refresh the page in your browser. The first time you run this you will need to accept the connection in PHPStorm.

  7. You should then see the output in the debugging window in PHPStorm.