Download the PHP package johnatas-x/drupal-quality-checker without Composer

On this page you can find all versions of the php package johnatas-x/drupal-quality-checker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package drupal-quality-checker

:warning::warning::warning::warning::warning:

This project is deprecated and obsolete.

The baseline is too soft, prefer the use of this tool: Angry bearded by adapting the rules to your needs.

This project is based on axelerant and vijaycs85 and the last version

Package for Drupal Code Quality presets

This has been customised from axelerant/drupal-quality-checker which has been customised from vijaycs85/drupal-quality-checker. The goal is to have the initial project up to date while taking advantage of Axelerant's improvements. In order to be as global as possible, the Axelerant's logo has been replaced by Drupal's logo (from the initial project).

Installation

Upgrading from Beta 8? Read the instructions for changes you need to make to grumphp.yml.dist.

When using drupal/core-composer-scaffold (recommended)

In most cases, you would already be using the drupal/core-composer-scaffold package if you have set up using the latest Drupal templates. This package uses core-composer-scaffold to set up configuration files in your project. To make this work, add this package name in your composer's extra.drupal-scaffold.allowed-packages section.

Now, run composer require to include the package in your application. Since the package is now allowed, the core-composer-scaffold package will copy the configuration files.

See More about scaffolding for more details.

Without drupal/core-composer-scaffold

If you're not using the scaffolding plugin, the package won't copy the configuration files as expected.

First, run composer require to include the package in your application.

If you don't already have a grumphp.yml file in your project, GrumPHP would ask you to create one. Answer "No" to the prompt.

Then, copy all the *.dist from the library to your project root. The files copied are:

Usage

No additional steps required, but if git hooks aren't fired, run php ./vendor/bin/grumphp git:init. For additional commands, look at grumhp's documentation.

Customising

Almost all customising begins with first copying the grumphp.yml.dist file to your project. Make sure you have the file.

Adding tasks

There are various tasks you can add and customise in your grumphp.yml. Read the online documentation for GrumPHP tasks to see the tasks you can use and configure.

Forcing commit message format

To configure commit message structure, use the git_commit_message task. For example, to enforce the commit message contains the Jira issue ID, use the rule as the following snippet. More options are documented online.

Disable commit banners

GrumPHP supports banners to celebrate (or scold) on your commit. This is fun but it is possible it gets on your nerves. If you don’t want it, edit the grumphp.yml file and replace the following parameters:

You could even disable specific ones like this:

Overwrite phpmd ruleset

Copy the ruleset to the project root first

Edit it as per your needs and commit. Remember to modify the grumphp.yml file with the new path.

Customise phpcs rules

Copy the ruleset to the project root first

Edit it as per your needs and commit. Remember to modify the grumphp.yml file with the new path.

Customise phpstan parameters

Copy the ruleset to the project root first

Edit it as per your needs and commit.

More about scaffolding

As described before, this package uses drupal/core-composer-scaffold plugin to scaffold a few files to the project root. This is not required but there is a good chance you are already using it if you're building a Drupal site.

The scaffolding operation runs with every composer operation and overwrites files. Only the file grumphp.yml.dist is not overwritten during subsequent operations. If you are customising any of the other configuration files and don't want the updates to overwrite your changes, you can override the behaviour in your composer.json file. For example, to skip phpmd.xml.dist from being overwritten, add this to your composer.json:

For more details, read the "Excluding Scaffold files" section of the documentation for the core-composer-scaffold plugin.

Upgrading from Beta 8

GrumPHP 0.19 introduced a breaking change to the structure of the YAML file. The template in this repository is updated as per the new structure. However, you would need to change the YML files on your projects before you update to Beta 9 or later.

Fortunately, the change is simple and in many cases would only require a one line change. Rename the parameters section to grumphp. Our default template contains two parameters which still need to remain under parameters. They are git_dir and bin_dir. Look at the diff of the change to understand what needs to be changed in your grumphp.yml file. Also, read more at the release page for GrumPHP 0.19.

Lastly, you can watch this video where I upgrade this on a project. Link: https://youtu.be/XoFJfBcZF58


All versions of drupal-quality-checker with dependencies

PHP Build Version
Package Version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package johnatas-x/drupal-quality-checker contains the following files

Loading the files please wait ....