2017 © Pedro Peláez
 

composer-plugin composer-plugins

Composer plugin for installing PHP_CodeSniffer standards

image

maxicoffee/composer-plugins

Composer plugin for installing PHP_CodeSniffer standards

  • Wednesday, November 16, 2016
  • by maxicoffee
  • Repository
  • 1 Watchers
  • 0 Stars
  • 262 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Composer Plugins

A collection of composer plugins for specific installation instruction for composer packages., (*1)

Important: if you are running on Flow 3+ and have the typo3/ci-flow package installed using your main distributions composer.json you should remove it there and install the codesniffer in a separate folder, like for example: https://git.typo3.org/Neos/Distributions/Base.git/tree/refs/heads/master:/Build/PhpCodesniffer, (*2)

PHP Codesniffer Standard installer

The PHP Codesniffer Standard installer is able to install phpcs codesniffer standards into the <vendor>/squizlabs/php_codesniffer/CodeSniffer/Standards/ folder. By doing so the standard will be usable by calling bin/phpcs --standard <standard>., (*3)

How To Use

  • Find the package containing the codesniffs you want to use. This package should be a normal Codesniffing package containing a ruleset.xml and a composer.json.
  • The composer package type has to be phpcodesniffer-standard
  • The name of the package has to reflect the name of the standard (explained below)
  • It's best if the package has a requirement to simplyadmire/composer-plugins. This is the only way to be sure the installer is available before the package is installed.
  • Now add the package as a development dependency to your project
  • Run bin/phpcs -i and see your standard listed

Naming Rules

The name of the standard is derived from the composer packagekey. The part after the / is taken as standard name. The first character is made uppercase, and all characters after a - will be uppercased. So:, (*4)

  • vendor/mysniffs becomes Mysniffs
  • vendor/some-more-words becomes SomeMoreWords

TYPO3 Specific

The TYPO3 community already has packages available on packagist, and as renaming packagenames would be a bad practice we added 3 hardcoded standard names. Also the vendor name TYPO3 will always be enforced to be uppercase., (*5)

To include the TYPO3 CGL to your project you can use one of the following commands (depending on the CGL you want to use, TYPO3 Flow or TYPO3 CMS):, (*6)

TYPO3 Flow:, (*7)

    composer require --dev typo3-ci/typo3flow=dev-master

TYPO3 CMS:, (*8)

    composer require --dev typo3-ci/typo3cms=dev-master

Now you can sniff your packages with for example:, (*9)

    bin/phpcs --extensions=php --standard=TYPO3Flow Packages/Application/My.Package

The Versions

16/11 2016

dev-master

9999999-dev

Composer plugin for installing PHP_CodeSniffer standards

  Sources   Download

LGPL-3.0+

The Requires

 

by Rens Admiraal

phpcs typo3 php_codesniffer standards typo3 cms typo3 flow typo3 neos

16/11 2016

2.0.2

2.0.2.0

Composer plugin for installing PHP_CodeSniffer standards

  Sources   Download

LGPL-3.0+

The Requires

 

by Rens Admiraal

phpcs typo3 php_codesniffer standards typo3 cms typo3 flow typo3 neos

20/01 2016

dev-working-install-path

dev-working-install-path

Composer plugin for installing PHP_CodeSniffer standards

  Sources   Download

LGPL-3.0+

The Requires

 

by Rens Admiraal

phpcs typo3 php_codesniffer standards typo3 cms typo3 flow typo3 neos

21/06 2015

2.0.1

2.0.1.0

Composer plugin for installing PHP_CodeSniffer standards

  Sources   Download

LGPL-3.0+

The Requires

 

by Rens Admiraal

phpcs typo3 php_codesniffer standards typo3 cms typo3 flow typo3 neos

24/02 2015

2.0.0

2.0.0.0

Composer plugin for installing PHP_CodeSniffer standards

  Sources   Download

LGPL-3.0+

The Requires

 

by Rens Admiraal

phpcs typo3 php_codesniffer standards typo3 cms typo3 flow typo3 neos

24/02 2015

1.0.3

1.0.3.0

Composer plugin for installing PHP_CodeSniffer standards

  Sources   Download

LGPL-3.0+

The Requires

 

by Rens Admiraal

phpcs typo3 php_codesniffer standards typo3 cms typo3 flow typo3 neos

25/07 2014

1.0.2

1.0.2.0

Composer plugin for installing PHP_CodeSniffer standards

  Sources   Download

LGPL-3.0+

The Requires

 

by Rens Admiraal

phpcs typo3 php_codesniffer standards typo3 cms typo3 flow typo3 neos

22/07 2014

1.0.1

1.0.1.0

Composer plugin for installing PHP_CodeSniffer standards

  Sources   Download

LGPL-3.0+

The Requires

 

by Rens Admiraal

phpcs typo3 php_codesniffer standards typo3 cms typo3 flow typo3 neos

21/10 2013

1.0.0

1.0.0.0

Composer plugin for installing PHP_CodeSniffer standards

  Sources   Download

LGPL-3.0+

The Requires

 

by Rens Admiraal

phpcs typo3 php_codesniffer standards typo3 cms typo3 flow typo3 neos