Rules 8.x-3.x development
PHP Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config Make context processor schema pass schema validation. Sep 22, 2016
d7-tests Issue #2861500 by RenatoG: Folder d7-tests - Clear test function alre… Dec 14, 2017
js Issue #2648326: added nested autocomplete suggestions in the UI Mar 21, 2016
src Issue #2281087 by TR, Amerie, fago: Port "Text comparison (text_match… Dec 14, 2017
tests Issue #2936679 by jonathan1055: Autocomplete test needs values for "D… Feb 22, 2018
.gitignore Issue #2903855: Add phpcs versions as dev dependencies. Sep 30, 2017
.travis.yml Issue #2937362 by jonathan1055: Fix composer install syntax in .travi… Jan 18, 2018
README.md Issue #2903855: Add phpcs documentation. Sep 30, 2017
composer.json Issue #2903855: Use latest compatible php codesniffer version. Sep 30, 2017
composer.lock Issue #2903855: Use latest compatible php codesniffer version. Sep 30, 2017
phpcs.xml.dist Issue #2903855: Fix phpcs complaining about ConditionManager having i… Sep 30, 2017
rules.info.yml Issue #2903855 Add project to make dependencies fully namespaced in .yml Sep 30, 2017
rules.libraries.yml Issue #2648326: Implemented first version of UI data selector autocom… Mar 13, 2016
rules.links.action.yml Issue #2922912 by TR, fago: Files with executable file mode Dec 14, 2017
rules.links.menu.yml Issue #2922912 by TR, fago: Files with executable file mode Dec 14, 2017
rules.links.task.yml Issue #2922912 by TR, fago: Files with executable file mode Dec 14, 2017
rules.module Issue #2702159 by yanniboi, jmoreira, oushen, klausi: Fixed send mail… Jun 8, 2016
rules.permissions.yml Issue #2922912 by TR, fago: Files with executable file mode Dec 14, 2017
rules.routing.yml Issue #2922912 by TR, fago: Files with executable file mode Dec 14, 2017
rules.rules.events.yml Issue #2658842 by a.milkovsky: Add support for Rules event handlers a… Feb 22, 2016
rules.rules_ui.yml Issue #2922828 by TR: Spelling Dec 14, 2017
rules.services.yml Issue #2852231 by Devin Carlson, TR: Cache bin doesn't follow the nam… Dec 14, 2017

README.md

Rules for Drupal 8

Build Status

The Rules module allows site administrators to define conditionally executed actions based on occurring events (ECA-rules).

Contributing

Link to Rules 8.x-3.x contributing tasks.

For some time, development will happen on GitHub using the pull request model: in case you are not familiar with that, please take a few minutes to read the GitHub article on using pull requests.

There are a few conventions that should be followed when contributing:

  • Always create an issue in the drupal.org Rules issue queue for every pull request you are working on.
  • Always cross-reference the Issue in the Pull Request and the Pull Request in the issue.
  • Always create a new branch for every pull request: its name should contain a brief summary of the ticket and its issue id, e.g readme-2276369.
  • Try to keep the history of your pull request as clean as possible by squashing your commits: you can look at the Symfony documentation or at the Git book for more information on how to do that.

For further information on how to contribute please refer to our documentation.

Checking coding style

The module comes with a phpcs setup that is verifying a correct coding style. To run the check just execute the following command from the rules module directory:

  # Install phpcs as local dev dependency, then run it:
  composer install
  ./vendor/bin/phpcs

  # If there are some coding style violations that can be fixed
  # automatically, use the code beautifier:
  ./vendor/bin/phpcbf

Executing the automated tests

This module comes with PHPUnit tests. You need a working Drupal 8 installation and a checkout of the Rules module in the modules folder.

Unit tests only

cd /path/to/drupal-8/core
../vendor/bin/phpunit ../modules/rules/tests/src/Unit
../vendor/bin/phpunit ../modules/rules/tests/src/Integration

Unit tests and kernel/web tests

Make sure to use your DB connection details for the SIMPLETEST_DB and the URL to your local Drupal installation for SIMPLETEST_BASE_URL.

cd /path/to/drupal-8/core
export SIMPLETEST_DB=mysql://drupal-8:password@localhost/drupal-8
export SIMPLETEST_BASE_URL=http://drupal-8.localhost
../vendor/bin/phpunit ../modules/rules

Example for executing one single test file during development:

../vendor/bin/phpunit ../modules/rules/tests/src/Unit/ActionSetTest.php

You can also execute the test cases from the web interface at /admin/config/development/testing.