Skip to content

Commit

Permalink
Require PHP 7.1, add phpstan, Doctrine coding standards, add scrutini…
Browse files Browse the repository at this point in the history
…zer and update travis ci.
  • Loading branch information
jwage committed May 23, 2018
1 parent 41a9449 commit 9ca129c
Show file tree
Hide file tree
Showing 15 changed files with 3,051 additions and 222 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# PhpStorm
/.idea

vendor
composer.lock

1 change: 1 addition & 0 deletions .phpcs-cache

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
build:
nodes:
analysis:
environment:
php:
version: 7.1
cache:
disabled: false
directories:
- ~/.composer/cache
project_setup:
override: true
tests:
override:
- php-scrutinizer-run
- phpcs-run
dependencies:
override:
- composer install --ignore-platform-reqs --no-interaction

tools:
external_code_coverage:
timeout: 600

build_failure_conditions:
- 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed
- 'issues.label("coding-style").new.exists' # No new coding style issues allowed
- 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity
- 'project.metric_change("scrutinizer.test_coverage", < 0)' # Code Coverage decreased from previous inspection
55 changes: 46 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,56 @@
dist: trusty
sudo: false
language: php

php:
- 5.4
- 5.5
- 5.6
- hhvm
- 7.0
- 7.1
- 7.2
- nightly

before_script: composer install
cache:
directories:
- $HOME/.composer/cache

matrix:
before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- travis_retry composer self-update
- travis_retry composer config --unset platform.php

install:
- rm composer.lock
- travis_retry composer update --prefer-dist

script:
- ./vendor/bin/phpunit

jobs:
allow_failures:
- php: hhvm
- php: nightly
fast_finish: true

include:
- stage: Test
env: DEPENDENCIES=low
install:
- rm composer.lock
- travis_retry composer update --prefer-dist --prefer-lowest

- stage: Test
env: COVERAGE
before_script:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script:
- ./vendor/bin/phpunit --coverage-clover clover.xml
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover clover.xml

- stage: Code Quality
env: CODING_STANDARDS
install: travis_retry composer install --prefer-dist
script: ./vendor/bin/phpcs

- stage: Code Quality
env: STATIC_ANALYSIS
install: travis_retry composer install --prefer-dist
script: vendor/bin/phpstan analyse -l 7 -c phpstan.neon src
7 changes: 3 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
EasyCSV
=======

EasyCSV is a simple Object Oriented CSV manipulation library for PHP 5.4+
EasyCSV is a simple Object Oriented CSV manipulation library for PHP 7.1+

[![Build Status](https://secure.travis-ci.org/jwage/easy-csv.png?branch=master)](http://travis-ci.org/jwage/easy-csv)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/jwage/easy-csv/badges/quality-score.png?s=2de4fb739a50630ffcbc61b62bfda161ac38afd4)](https://scrutinizer-ci.com/g/jwage/easy-csv/)
[![Code Coverage](https://scrutinizer-ci.com/g/jwage/easy-csv/badges/coverage.png?s=e77261403858e1bd97b4135a622e76a0423ec248)](https://scrutinizer-ci.com/g/jwage/easy-csv/)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/jwage/easy-csv/badges/quality-score.png?s=7e0e1d4b5d7f6be61a3cd804dba556a0e4d1141d)](https://scrutinizer-ci.com/g/jwage/easy-csv/)
[![Code Coverage](https://scrutinizer-ci.com/g/jwage/easy-csv/badges/coverage.png?s=a02332bc4d6a32df3171f2ba714e4583a70c0154)](https://scrutinizer-ci.com/g/jwage/easy-csv/)
[![Latest Stable Version](https://poser.pugx.org/jwage/easy-csv/v/stable.png)](https://packagist.org/packages/jwage/easy-csv)
[![Total Downloads](https://poser.pugx.org/jwage/easy-csv/downloads.png)](https://packagist.org/packages/jwage/easy-csv)
[![Dependency Status](https://www.versioneye.com/php/jwage:easy-csv/1.0.0/badge.png)](https://www.versioneye.com/php/jwage:easy-csv/1.0.0)

## Installation

Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@
}
},
"require": {
"php": ">=5.4.0"
"php": "^7.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.5|^6.5"
"doctrine/coding-standard": "^4.0",
"phpstan/phpstan": "^0.9.2",
"phpstan/phpstan-strict-rules": "^0.9",
"phpunit/phpunit": "^5.5|^6.5|^7.0"
},
"extra": {
"branch-alias": {
Expand Down
Loading

0 comments on commit 9ca129c

Please sign in to comment.