Download the PHP package innoraft/drupal-quality-checker without Composer

On this page you can find all versions of the php package innoraft/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

Drupal Code Quality Checker


Overview

This composer package will provide some basic code quality checks before committing code by using https://github.com/phpro/grumphp. Check out this Lullabot article for more details.

This has been customised from vijaycs85/drupal-quality-checker for Innoraft needs.

Install

  1. Add innoraft/drupal-quality-checker to composer.json or just run

  2. Replace grumphp.yml in project's root directory (not Drupal root directory) with vendor/innoraft/drupal-quality-checker/grumphp.yml.dist

That's it. Now, all tasks (listed below) run on every git commit.

Note: As part of install, GrumPHP adds pre-commit hook to repository. Existing pre-commit might get destroyed when install/uninstall.

Out of the box

  1. PHPCS with Drupal standard.
  2. PHP Lint
  3. YAML Lint
  4. Composer
  5. Composer Normalize
  6. JSONLint
  7. Trufflehog

Long list of additional checks/validators available here.

To automatically setup all the packages, follow the below steps:

  1. Download the setup.sh file and place it outside the docroot.
  2. Update Line 12 of setup.sh having the command composer require --dev innoraft/drupal-quality-checker. Use the appropriate environment for your setup. For example, if you are working with Lando, use lando composer require --dev innoraft/drupal-quality-checker.
  3. Update Line 102 of setup.sh having the command composer dump-autoload. Use the appropriate environment for your setup. For example, if you are working with Lando, use lando composer dump-autoload.
  4. From outside the docroot run this command that will make the bash script executable

  5. To execute the bash script run this command from outside the docroot

  6. After executing the script, a prompt will appear asking for the base directory name , site name and custom theme name, which need to be entered cmd

  7. Few other prompts will appear where consent is needed to download the required package for the configuration

    image

  8. When prompted for tasks to run, select any option, as grumphp.yml is already included in the package and will be used for setup, making this selection less critical:

    image

  9. After this, please wait for some time for the script to execute and the setup to be completed.

Incase you want to install them individually, follow the below steps:

ESLint task Setup

  1. Go to custom theme folder and add eslint package with npm

  2. Now run this command at project's root directory

    For multisite run the following command

  3. Update bin key for eslint task under grumphp.yml file with relative address to eslint's bin file.

    Example: if your theme name is drupal_theme then change it to web/themes/custom/drupal_theme/node_modules/.bin/eslint

Stylelint task Setup

  1. Go to custom theme folder and add stylelint package with npm

  2. Now run this command at project's root directory

    For multisite run the following command

  3. For multisite run the following command

  4. Update bin key for stylelint task under grumphp.yml file with relative address to stylelint's bin file.

    Example: if your theme name is drupal_theme then change it to web/themes/custom/drupal_theme/node_modules/.bin/stylelint

Trufflehog task Setup

  1. Create a new folder tasks at project's root level.

  2. Now run this command at project's root directory

  3. Now add the following code in your composer.json file which is present at project's root directory. ( For reference you can check composer.json file of this package )

    Once the code is added in composer.json then execute this command

  4. Install trufflehog ( If not already install ). You can execute the following command to achieve the same.

  5. Please check and confirm if your grumphp.yml is updated with vendor/innoraft/drupal-quality-checker/grumphp.yml.dist ( Check and confirm if trufflehog tasks & service attribute is added in grumphp.yml file )

  6. Trufflehog is now ready to sniff your secrets :)

All versions of drupal-quality-checker with dependencies

PHP Build Version
Package Version
Requires drupal/coder Version ^8.3
ergebnis/composer-normalize Version ^2.0
friendsoftwig/twigcs Version ^6.0
palantirnet/drupal-rector Version ^0.13.1
phpro/grumphp Version ^2.0
phpstan/phpstan Version ^1.9
squizlabs/php_codesniffer Version ^3.7
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 innoraft/drupal-quality-checker contains the following files

Loading the files please wait ....