Skip to content

D3R/standards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D3R Coding Standards

Installation

composer require --dev d3r/standards

PHPCS

"phpcs_additional_args": {
	"--standard": "vendor/d3r/standards/D3R-PHP.xml"
}

or use the stricter standard

	"--standard": "vendor/d3r/standards/D3R-DEV-PHP.xml"
}

Dev environment

For your editor I suggest checking this package out globally:

composer global require d3r/standards

Then point your editor's phpcs and phpcbf to /Users/<username>/.composer/vendor/d3r/standards/D3R-PHP.xml.

Licence Checker

You will automatically get licence checking in CI if you are using the standard D3R GitHub Workflow.

If you need to add specific packages, vendors or licences to your local project, you can create a .allowed-licenses.php config file using the base config as a starting point.

As an example, to include an extra vendor and a specific package on top of the base setup, you would add the following to .allowed-licenses.php:

<?php

declare(strict_types=1);

use D3R\Standards\ComposerLicenseChecker;

return ComposerLicenseChecker::defaultBuilder()
    ->addAllowedVendor('foo') // Allow all foo packages
    ->addAllowedPackage('printnode/printnode-php') // Specifies MIT in GitHub but not in composer.json
    ->build();

About

D3R Coding standards

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages