Download the PHP package acquia/coding-standards without Composer

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

Acquia Coding Standards for PHP

Latest Stable Version Total Downloads Latest Unstable Version License Tests

Acquia Coding Standards for PHP is a collection of PHP_CodeSniffer rules (sniffs) for Acquia coding standards for PHP projects, including Drupal extensions.

Rules

Acquia Coding Standards for PHP includes a selection of sniffs from the following rulesets:

Rulesets

Rules are split into rulesets according to the project framework and audience:

There are four permutations of these guidelines, leading to four rulesets to choose from:

Installation & usage

  1. Add Acquia Coding Standards for PHP to your project via Composer:

  2. Inform PHP CodeSniffer of the location of the standard and its dependencies:

  3. Check code for standards compliance:

    Automatically fix any standards violations possible:

    The --extensions argument must match the chosen code standard. For AcquiaPHP, use --extensions=php,inc,test,css,txt,md,yml.

  4. Optionally create a default configuration file for your project so you don't have to provide the command-line arguments every time (i.e., below). Here's a working example: example/phpcs.xml.dist.

    Modify phpcs.xml.dist to suit your project, especially to set the preferred code standard and matching extensions.

  5. Optionally add code checking to your Git pre-commit hook to prevent committing code with violations. Since client-side Git hooks are not copied when a repository is cloned, you might like to use an automated solution like BrainMaestro/composer-git-hooks to manage them, for example: example/composer.json.

  6. Optionally configure PHP Code Sniffer integration in PhpStorm or your IDE or code editor of choice. You can import example/PhpStormInspections.xml to set up default integration for new projects. When you open or create a new project for the first time, PhpStorm should automatically detect and set up PHPCS inspections based on these defaults. You will just need to uncheck the “installed standards paths” in the inspection settings for your project so that PhpStorm can find the Acquia Coding Standards.

Contribution

Contributions are welcome! See CONTRIBUTING.md.

License

Copyright (C) 2019 Acquia, Inc.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


All versions of coding-standards with dependencies

PHP Build Version
Package Version
Requires drupal/coder Version ^8.3
phpcompatibility/php-compatibility Version ^9.3
slevomat/coding-standard Version ^8.4
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 acquia/coding-standards contains the following files

Loading the files please wait ....