From e33ca115c523bb6ffbef112ee51e56878944eb25 Mon Sep 17 00:00:00 2001 From: widmogrod Date: Sat, 12 Aug 2017 16:40:06 +0200 Subject: [PATCH] codeclimate --- .travis.yml | 20 ++- composer.json | 7 +- composer.lock | 383 +++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 400 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 06a9b52..fa4f989 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,21 +9,29 @@ php: - hhvm matrix: + include: + - php: 7.1 + env: COVERAGE=yes + env: CHECK_STYLE=yes allow_failures: - php: hhvm +cache: + directories: + - $HOME/.composer/cache + before_script: - composer self-update - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter install: - composer install --prefer-source script: - - composer test - - composer check-code - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT + - if [[ $CHECK_STYLE == yes ]]; then composer check-code; fi + - if [[ $COVERAGE == yes ]]; then composer unitc; else composer unit; fi + +after_success: + - if [[ $COVERAGE == yes ]]; then composer codeclimate-send-coverage; fi notifications: - email: "widmogrod+php-functional@gmail.com" + email: false diff --git a/composer.json b/composer.json index 13e3a4a..8baa666 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,8 @@ "description": "Functors, Applicative and Monads are fascinating concept. Purpose of this library is to explore them in OOP PHP world.", "require-dev": { "phpunit/phpunit": "^4.7", - "friendsofphp/php-cs-fixer": "^1.12" + "friendsofphp/php-cs-fixer": "^1.12", + "codeclimate/php-test-reporter": "^0.4.4" }, "license": "MIT", "authors": [ @@ -14,7 +15,9 @@ ], "prefer-stable": true, "scripts": { - "test": "phpunit", + "unit": "phpunit --no-coverage", + "unitc": "phpunit --coverage-clover ./codecoverage.xml", + "codeclimate-send-coverage": "test-reporter --coverage-report=codecoverage.xml", "fix-code": "php-cs-fixer fix", "check-code": "php-cs-fixer fix --verbose --diff --dry-run" }, diff --git a/composer.lock b/composer.lock index 4dddd85..8c45b13 100644 --- a/composer.lock +++ b/composer.lock @@ -4,10 +4,69 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "4c62ab5fade93ff75d25db4c9938bf09", - "content-hash": "baa3305826cb1a3470d1258702482546", + "hash": "64b1c926dcd7fd7a8e4f14759dc7e361", + "content-hash": "235e140c8c8e26ad91c1ecad33d2ed97", "packages": [], "packages-dev": [ + { + "name": "codeclimate/php-test-reporter", + "version": "v0.4.4", + "source": { + "type": "git", + "url": "https://github.com/codeclimate/php-test-reporter.git", + "reference": "eab9ac233f23a4c12a12755793750f22fc46dd3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/codeclimate/php-test-reporter/zipball/eab9ac233f23a4c12a12755793750f22fc46dd3e", + "reference": "eab9ac233f23a4c12a12755793750f22fc46dd3e", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "padraic/phar-updater": "^1.0", + "php": "^5.3 || ^7.0", + "psr/log": "^1.0", + "satooshi/php-coveralls": "^1.0", + "symfony/console": "^2.0 || ^3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.0.0", + "phpunit/phpunit": "^4.8.31" + }, + "bin": [ + "composer/bin/test-reporter" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "CodeClimate\\PhpTestReporter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Code Climate", + "email": "hello@codeclimate.com", + "homepage": "https://codeclimate.com" + } + ], + "description": "PHP client for reporting test coverage to Code Climate", + "homepage": "https://github.com/codeclimate/php-test-reporter", + "keywords": [ + "codeclimate", + "coverage" + ], + "time": "2017-02-15 22:25:47" + }, { "name": "doctrine/instantiator", "version": "1.0.5", @@ -120,6 +179,208 @@ "description": "A tool to automatically fix PHP code style", "time": "2016-12-01 00:05:05" }, + { + "name": "guzzle/guzzle", + "version": "v3.8.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/4de0618a01b34aa1c8c33a3f13f396dcd3882eba", + "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": ">=2.1" + }, + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" + }, + "require-dev": { + "doctrine/cache": "*", + "monolog/monolog": "1.*", + "phpunit/phpunit": "3.7.*", + "psr/log": "1.0.*", + "symfony/class-loader": "*", + "zendframework/zend-cache": "<2.3", + "zendframework/zend-log": "<2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.8-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" + } + ], + "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "abandoned": "guzzlehttp/guzzle", + "time": "2014-01-28 22:29:15" + }, + { + "name": "padraic/humbug_get_contents", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/humbug/file_get_contents.git", + "reference": "66797199019d0cb4529cb8d29c6f0b4c5085b53a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/humbug/file_get_contents/zipball/66797199019d0cb4529cb8d29c6f0b4c5085b53a", + "reference": "66797199019d0cb4529cb8d29c6f0b4c5085b53a", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Humbug\\": "src/Humbug/" + }, + "files": [ + "src/function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + } + ], + "description": "Secure wrapper for accessing HTTPS resources with file_get_contents for PHP 5.3+", + "homepage": "https://github.com/padraic/file_get_contents", + "keywords": [ + "download", + "file_get_contents", + "http", + "https", + "ssl", + "tls" + ], + "time": "2015-04-22 18:45:00" + }, + { + "name": "padraic/phar-updater", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/humbug/phar-updater.git", + "reference": "ac8802df2d1d03b7092b6f044a914f8d21592aae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/humbug/phar-updater/zipball/ac8802df2d1d03b7092b6f044a914f8d21592aae", + "reference": "ac8802df2d1d03b7092b6f044a914f8d21592aae", + "shasum": "" + }, + "require": { + "padraic/humbug_get_contents": "1.0.4", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Humbug\\SelfUpdate\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Padraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + } + ], + "description": "A thing to make PHAR self-updating easy and secure.", + "keywords": [ + "humbug", + "phar", + "self-update", + "update" + ], + "time": "2017-07-12 22:42:45" + }, { "name": "phpdocumentor/reflection-common", "version": "1.0", @@ -747,6 +1008,64 @@ ], "time": "2016-10-10 12:19:37" }, + { + "name": "satooshi/php-coveralls", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/satooshi/php-coveralls.git", + "reference": "da51d304fe8622bf9a6da39a8446e7afd432115c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/da51d304fe8622bf9a6da39a8446e7afd432115c", + "reference": "da51d304fe8622bf9a6da39a8446e7afd432115c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzle/guzzle": "^2.8|^3.0", + "php": ">=5.3.3", + "psr/log": "^1.0", + "symfony/config": "^2.1|^3.0", + "symfony/console": "^2.1|^3.0", + "symfony/stopwatch": "^2.0|^3.0", + "symfony/yaml": "^2.0|^3.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/coveralls" + ], + "type": "library", + "autoload": { + "psr-4": { + "Satooshi\\": "src/Satooshi/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/satooshi/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2016-01-20 17:35:46" + }, { "name": "sebastian/comparator", "version": "1.2.2", @@ -1119,6 +1438,66 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2015-06-21 13:59:46" }, + { + "name": "symfony/config", + "version": "v3.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "35716d4904e0506a7a5a9bcf23f854aeb5719bca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/35716d4904e0506a7a5a9bcf23f854aeb5719bca", + "reference": "35716d4904e0506a7a5a9bcf23f854aeb5719bca", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/filesystem": "~2.8|~3.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, + "require-dev": { + "symfony/dependency-injection": "~3.3", + "symfony/yaml": "~3.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2017-06-02 18:07:20" + }, { "name": "symfony/console", "version": "v3.2.1",