diff --git a/.gitattributes b/.gitattributes index 2e9e7319..4f9544bf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,10 @@ # Set default behaviour, in case users don't have core.autocrlf set. * text=auto * text eol=lf + +# Remove files for archives generated using `git archive` +phpunit.xml.dist export-ignore +.travis.yml export-ignore +.gitignore export-ignore +.gitattributes export-ignore +.editorconfig export-ignore diff --git a/.travis.yml b/.travis.yml index 137a9653..95686e4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: php sudo: false php: - - 5.5 - 5.6 - 7.0 - 7.1 @@ -24,33 +23,36 @@ matrix: - php: 7.1 env: PHPCS=1 DEFAULT=0 + - php: 7.1 + env: CODECOVERAGE=1 DEFAULT=0 + - php: 5.6 - env: COVERALLS=1 DEFAULT=0 + env: PREFER_LOWEST=1 allow_failures: - env: DB=sqlite db_dsn='sqlite:///:memory:' - env: DB=pgsql db_dsn='postgres://postgres@127.0.0.1/cakephp_test' before_script: - - composer install --prefer-dist --no-interaction + - if [[ $PREFER_LOWEST != 1 ]]; then composer install --prefer-source --no-interaction ; fi + - if [[ $PREFER_LOWEST == 1 ]]; then composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable ; fi - if [[ $PHPCS != 1 ]]; then composer require phpunit/phpunit:"^5.7.14|^6.0"; fi - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi" - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi" - - sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi" - - sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi" - - phpenv rehash - set +H - cp phpunit.xml.dist phpunit.xml script: - - sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi" - - sh -c "if [ '$COVERALLS' = '1' ]; then php vendor/bin/coveralls -c .coveralls.yml -v; fi" - sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit; fi" - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --ignore=vendor --ignore=docs . ; fi" + - if [[ $CODECOVERAGE == 1 ]]; then vendor/bin/phpunit --coverage-clover=clover.xml || true; fi + - if [[ $CODECOVERAGE == 1 ]]; then wget -O codecov.sh https://codecov.io/bash; fi + - if [[ $CODECOVERAGE == 1 ]]; then bash codecov.sh; fi + notifications: email: false diff --git a/README.md b/README.md index 127dad14..546fb877 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # CakePHP Feed Plugin [![Build Status](https://api.travis-ci.org/dereuromark/cakephp-feed.svg)](https://travis-ci.org/dereuromark/cakephp-feed) -[![Coverage Status](https://coveralls.io/repos/dereuromark/cakephp-feed/badge.svg)](https://coveralls.io/r/dereuromark/cakephp-feed) -[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%205.4-8892BF.svg)](https://php.net/) +[![Coverage Status](https://codecov.io/gh/dereuromark/cakephp-feed/branch/master/graph/badge.svg)](https://codecov.io/gh/dereuromark/cakephp-feed) +[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg)](https://php.net/) [![License](https://poser.pugx.org/dereuromark/cakephp-feed/license.svg)](https://packagist.org/packages/dereuromark/cakephp-feed) [![Total Downloads](https://poser.pugx.org/dereuromark/cakephp-feed/d/total.svg)](https://packagist.org/packages/dereuromark/cakephp-feed) [![Coding Standards](https://img.shields.io/badge/cs-PSR--2--R-yellow.svg)](https://github.com/php-fig-rectified/fig-rectified-standards) diff --git a/composer.json b/composer.json index c02d6240..3e21f81f 100644 --- a/composer.json +++ b/composer.json @@ -13,21 +13,21 @@ } ], "require":{ - "php": ">=5.4", - "cakephp/cakephp": "~3.0" + "php": ">=5.6", + "cakephp/cakephp": "^3.5" }, "require-dev": { "fig-r/psr2r-sniffer": "dev-master" }, "autoload": { "psr-4": { - "Feed\\": "src" + "Feed\\": "src/" } }, "autoload-dev": { "psr-4": { - "Feed\\Test\\": "tests", - "Cake\\Test\\": "vendor/cakephp/cakephp/tests" + "Feed\\Test\\": "tests/", + "Cake\\Test\\": "vendor/cakephp/cakephp/tests/" } }, "support":{