Skip to content
Snippets Groups Projects
Commit 35e0a8f5 authored by Daniel Siepmann's avatar Daniel Siepmann
Browse files

Merge remote-tracking branch 'origin/develop' into 28-implement-psr-2-phpcodesniffer-standard

parents a38fa9ab 4b195f1a
Branches
3 merge requests!37Release 0.4.0,!29Feature/integrate psr2 into ci,!25FEATURE: Implement PSR-2 PHPCodeSniffer Standard
stages:
- test
cache:
paths:
- vendor/
test:5.3: &PHP-UNITTESTING
image: tetraweb/php:5.3
stage: test
tags:
- docker
variables:
TIMEZONE: "Europe/Berlin"
WITH_XDEBUG: "true"
before_script:
- apt-get update; apt-get install -y zip unzip
- composer install --optimize-autoloader --no-interaction --no-ansi --prefer-dist
script:
- ./vendor/bin/phpunit --coverage-text --colors=never
test:5.4:
<<: *PHP-UNITTESTING
image: tetraweb/php:5.4
test:5.5:
<<: *PHP-UNITTESTING
image: tetraweb/php:5.5
test:5.6:
<<: *PHP-UNITTESTING
image: tetraweb/php:5.6
test:7.0:
<<: *PHP-UNITTESTING
image: tetraweb/php:7.0
test:7.1:
<<: *PHP-UNITTESTING
image: tetraweb/php:7.1
test:latest:
<<: *PHP-UNITTESTING
image: tetraweb/php:latest
language: php
cache:
directories:
- $HOME/.composer/cache
php:
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
install:
- 'composer install --prefer-dist'
script:
- 'php vendor/bin/phpunit -c phpunit.xml.dist'
......@@ -3,24 +3,36 @@ About
Composer plugin installs [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) Standards.
[![Build Status](https://travis-ci.org/higidi/composer-phpcodesniffer-standards-plugin.svg?branch=master)](https://travis-ci.org/higidi/composer-phpcodesniffer-standards-plugin) [![Latest Stable Version](https://poser.pugx.org/higidi/composer-phpcodesniffer-standards-plugin/v/stable)](https://packagist.org/packages/higidi/composer-phpcodesniffer-standards-plugin) [![Total Downloads](https://poser.pugx.org/higidi/composer-phpcodesniffer-standards-plugin/downloads)](https://packagist.org/packages/higidi/composer-phpcodesniffer-standards-plugin) [![License](https://poser.pugx.org/higidi/composer-phpcodesniffer-standards-plugin/license)](https://packagist.org/packages/higidi/composer-phpcodesniffer-standards-plugin)
[![build status](https://git.higidi.com/higidi/composer-phpcodesniffer-standards-plugin/badges/master/build.svg)](https://git.higidi.com/higidi/composer-phpcodesniffer-standards-plugin/commits/master) [![coverage report](https://git.higidi.com/higidi/composer-phpcodesniffer-standards-plugin/badges/master/coverage.svg)](https://git.higidi.com/higidi/composer-phpcodesniffer-standards-plugin/commits/master) [![Latest Stable Version](https://poser.pugx.org/higidi/composer-phpcodesniffer-standards-plugin/v/stable)](https://packagist.org/packages/higidi/composer-phpcodesniffer-standards-plugin) [![Total Downloads](https://poser.pugx.org/higidi/composer-phpcodesniffer-standards-plugin/downloads)](https://packagist.org/packages/higidi/composer-phpcodesniffer-standards-plugin) [![License](https://poser.pugx.org/higidi/composer-phpcodesniffer-standards-plugin/license)](https://packagist.org/packages/higidi/composer-phpcodesniffer-standards-plugin)
Requirements
------------
_TODO_
- `PHP >= 5.3.3`
- Composer package providing the PHP CodeSniffer Rulesets & Sniffs
Installation
------------
_TODO_
```bash
$ composer require higidi/composer-phpcodesniffer-standards-plugin
```
Documentation
-------------
Change the type of your composer package to `php-codesniffer-standards`
_TODO_
Your composer.json should looks like:
```json
{
"name": "vendor/my-php-codesniffer-standards",
"description": "My codesniffer standards",
"type": "php-codesniffer-standards",
"require": {
"higidi/composer-phpcodesniffer-standards-plugin": "^1.0"
}
}
```
Issues
------
Bug reports and feature requests can be submitted on the [Github Issue Tracker](https://github.com/higidi/composer-phpcodesniffer-standards-plugin/issues)
Bug reports and feature requests can be submitted on the [Issue Tracker](https://git.higidi.com/higidi/composer-phpcodesniffer-standards-plugin/issues)
\ No newline at end of file
......@@ -38,6 +38,9 @@
"phpunit/phpunit": "^4.5 || ^5.0.5"
},
"extra": {
"class": "Higidi\\ComposerPhpCSStandardsPlugin\\Plugin"
"class": "Higidi\\ComposerPhpCSStandardsPlugin\\Plugin",
"branch-alias": {
"dev-master": "1.0.x-dev"
}
}
}
......@@ -16,7 +16,7 @@ use Symfony\Component\Finder\Finder;
class Installer extends LibraryInstaller
{
const TYPE = 'php-codesniffer-standards';
const TYPE = 'phpcodesniffer-standard';
/**
* Initializes library installer.
......@@ -227,4 +227,16 @@ class Installer extends LibraryInstaller
{
return $this->getInstallPath($this->getPHPCodeSnifferPackage($repo));
}
/**
* {@inheritDoc}
*/
public function supports($packageType)
{
$secondaryPackageTypes = array('phpcodesniffer-standards');
$deprecatedPackageTypes = array('php-codesniffer-standards');
return parent::supports($packageType)
|| in_array($packageType, array_merge($secondaryPackageTypes, $deprecatedPackageTypes));
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment