Download the PHP package brandembassy/coding-standard without Composer

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

Brand Embassy Coding Standard

Standards

For full reference of enforcements, go through default-ecs.php where each sniff / fixer deviating from default set lists is briefly described.

@TODO list of important sniffs

Skippable sniffs / fixers

Skipping of sniffs / fixers in general or for particular files should be configured in the ecs.php of your project. This file should leverage the default-ecs.php as the default configuration, but it expected that you will make adjustments to fit your project needs.

Installation

You can install the Brand Embassy Coding Standard as a composer dependency to your project:

ECS

You can run ecs with this command (without performing automatic fixes):

Or with automatic fixes:

You can use the --clear-cache option to clear the cache before applying the fixers and sniffers:

PHPStan

To use default configuration include default-phpstan.neon in your project's PHPStan config:

Rector

To use default configuration require default-rector.php in your project's Rector config:

⚠️ Tests for Rector rules need to run in a separate process, because Rector and PHPStan use different versions of php-parser. See explanation here https://github.com/staabm/zf-select-strip/pull/8. Another way would be to run them in a separate testsuite, but then we run into problems with code-coverage.

PhpStorm

This project contains inspections and code style configurations for PhpStorm.

Importing these configurations reduces number of errors in phpcs check before committing.

Versioning

This library follows semantic versioning, and additions to the code ruleset are only performed in major releases.

Testing

@TODO: inspiration - https://github.com/doctrine/coding-standard/tree/master/tests

If you are contributing to the Brand Embassy Coding Standard and want to test your contribution, you just need to execute PHPCS with the tests folder and ensure it matches the expected report:


All versions of coding-standard with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
composer-runtime-api Version ^2.2
dealerdirect/phpcodesniffer-composer-installer Version ^0.5 || ^0.7 || ^1.0
phpstan/phpstan Version ^1.11.6
phpstan/phpstan-mockery Version ^1.1
phpstan/phpstan-nette Version ^1.3.0
phpstan/phpstan-phpunit Version ^1.4.0
phpstan/phpstan-strict-rules Version ^1.6.0
rector/rector Version ^1.2.0
slevomat/coding-standard Version ^8.15.0
squizlabs/php_codesniffer Version ^3.9.2
symplify/easy-coding-standard Version ^12.1.14
tomasvotruba/cognitive-complexity Version ^0.2.3
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 brandembassy/coding-standard contains the following files

Loading the files please wait ....