Skip to main content

Development

You develop an Eddy extension against a real Drupal site. The build assembles a Drupal codebase in the build directory and links your extension into it. It then serves the codebase with PHP's built-in webserver and installs Drupal on an SQLite database. The site runs on the PHP and Composer of your machine, and CI builds it the same way. The browser of FunctionalJavascript tests runs on your machine too, unless you pick a Selenium container (see FunctionalJavascript tests).

This section covers the commands you use every day, how the build works and how to change what it does.

Commands at a glance​

Run each command through the wrapper you kept, such as make build or ahoy build. The following table lists the commands:

CommandWhat it doesAliases
buildRuns assemble, start and provision.None
assembleChecks the project and stops a running webserver, then assembles the codebase in build and links the extension into it.None
startStarts or restarts the PHP webserver, without XDebug unless XDEBUG is set.debug-off, xdebug-off
stopStops the webserver.None
provisionInstalls Drupal with the extension enabled.None
infoPrints a read-only summary of the environment.describe
debugStarts the webserver with XDebug, or restarts it with XDebug when it runs without. Does nothing while XDebug is on.debug-on, xdebug, xdebug-on
drushRuns a Drush command against the site.None
loginPrints a one-time login link.None
lintChecks coding standards.None
lint-fixFixes what the linters can fix.None
testStarts the FunctionalJavascript browser and leaves it running, then runs every PHPUnit suite and the Jest tests.None
test-unitRuns the PHPUnit Unit suite.None
test-kernelRuns the PHPUnit Kernel suite.None
test-functionalRuns the PHPUnit Functional suite.None
test-functional-javascriptStarts the browser and leaves it running, then runs the PHPUnit FunctionalJavascript suite.None
test-javascriptRuns the Jest tests.test-js
browser-startStarts the browser for FunctionalJavascript tests.None
browser-stopStops that browser.None
resetStops the webserver and the browser, and removes build, .logs and vendor.delete, destroy
toolingInstalls the tooling package into vendor. Make has this command and runs it before the commands that need it. Ahoy installs the package before every command apart from reset.None

The installer removes the commands of each tool you dropped, so a project without PHPUnit has no suite commands. lint, lint-fix and test stay and run the tools you kept. A bare make runs build, so run make help to list the make commands. A bare ahoy lists the Ahoy ones.

Without a wrapper, the tooling commands cover assemble, start, stop, provision, info, login, browser-start and browser-stop. The CONTRIBUTING.md of your extension lists the commands for the rest.

In this section​