Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 23 additions & 28 deletions docs/src/devs/getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,44 @@ to a web-based server environment.

There are two main approaches to local development:

**1. Using your machine's native technologies:**
**1. Using Docker for a containerized approach:**

Some operating systems come with some of the required tools pre-installed out of the box and (e.g. PHP, web and database
servers). Most of the time, you'll have to manually install the remaining ones. This approach generally requires more
time spent on maintaining and updating every technology separately as well as making sure that all the moving parts
continuously work well together.
Tools such as Lando or DDEV "packages" all the required technologies (web server, PHP and database) for you using
Docker, and simulates a server environment. This approach is more automated and requires less manual work as the
tool takes care of every component's version updates and compatibility is guaranteed.

**2. Using a containerized approach:**
**2. Using your machine's native technologies:**

i.e. a tool such as Lando or DDEV that "packages" all the required technologies for you and simulates a server environment.
This approach is more automated and requires less manual work as the tool takes care of every component's version updates
and compatibility is guaranteed.
Historically, we installed a LAMP-style stack manually, e.g. PHP, Apache/Nginx and a database. This approach generally
requires more time spent on maintaining and updating every technology separately as well as making sure that all the
moving parts continuously work well together.

No matter the local installation approach you adopt, Composer is required.

### Composer installation
### Composer

Drupal's Core, modules and themes, are all "packages" and Composer manages these dependencies in a structured and
organised manner. To put a Drupal website together, all assets have to be sourced from a dedicated URL and compiled to
create a fully functional build. To do that, Composer i.e. Drupal's dependency manager of choice, has to be present on
your local system.

There are two ways to install Composer, locally and globally. The latter is usually preferred as, with a single
executable installed once, it allows Composer to manage the dependencies of multiple projects present on your machine.
To install Composer, follow the detailed instructions on the
[official Composer documentation page](https://getcomposer.org/doc/00-intro.md#globally).
executable installed once, it allows Composer to manage the dependencies of multiple projects present on your machine.

Composer is included in DDEV and Lando.

### Working with Lando/DDEV containerized servers

Many of us use a containerization technology locally for testing and development, such as Lando or DDEV. Both of these
tools simplify the process of setting up and managing development environments for web projects. To use LGD locally with
either Lando or DDEV, you'll need to have Docker Desktop installed first.

#### Docker Desktop installation
tools simplify the process of setting up and managing development environments for web projects. To use LocalGov Drupal
locally with either Lando or DDEV, you'll need to have Docker installed first.

Docker Desktop is a one-click-install application for your Mac, Linux, or Windows environment that lets you build, share
and run containerized applications and microservices. It provides a straightforward GUI (Graphical User Interface) that
lets you manage your containers, applications, and images directly from your machine.
Different Docker solutions are recommended for macOS, Linux, and Windows, so please follow the instructions:

To install Docker Desktop, follow the steps outlined on the
[official Docker documentation page](https://docs.docker.com/desktop/install/mac-install/#system-requirements).
- [Installing DDEV and Docker](https://docs.ddev.com/en/stable/users/install/)
- [Installing Lando and Docker](https://docs.lando.dev/getting-started/requirements.html)

With Docker Desktop (and Composer) in place, you can now move on to:
With DDEV or Lando in place, you can now move on to:

- [Working with Lando](/devs/getting-started/working-with-lando.html) or
- [Working with DDEV](/devs/getting-started/working-with-ddev.html)
Expand All @@ -66,6 +61,7 @@ on their host machine. In that case, you will need to locally install the approp
- PHP
- Database server
- Web server
- [Composer](https://getcomposer.org/doc/00-intro.md#globally)

You can have a more thorough look on our dedicated page for the [Drupal Requirements](/devs/getting-started/drupal-requirements.html).

Expand All @@ -84,11 +80,10 @@ centralised issue tracking of bug reports for end users.

### Coding standards resources

* [Drupal coding standards](https://www.drupal.org/docs/develop/standards)
* [Drupal coding standards](https://project.pages.drupalcode.org/coding_standards/)

### Testing resources

* [PHPUnit documentation](https://phpunit.readthedocs.io/en/7.5/)
* [Drupal 8 PHPUnit documentation](https://www.drupal.org/docs/8/testing/phpunit-in-drupal-8)
* [Drupal 8 testing documentation](https://www.drupal.org/docs/8/testing)
* [Workshop: Automated Testing and Test Driven Development in Drupal 8](https://github.com/opdavies/workshop-drupal-automated-testing)
* [PHPUnit documentation](https://phpunit.readthedocs.io/en/)
* [Drupal 8 PHPUnit documentation](https://www.drupal.org/docs/develop/automated-testing/phpunit-in-drupal)
* [Drupal 8 testing documentation](https://www.drupal.org/docs/develop/automated-testing)
Loading