From e278912eaaa94079b9277d5dbe23fc0a22d308bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rk=20S=C3=A1gi-Kaz=C3=A1r?= Date: Tue, 20 Dec 2016 10:41:39 +0100 Subject: [PATCH] Improve package Update composer and LICENSE Update phpunit config Add some meta files Update testing --- .editorconfig | 9 +++++++++ .gitattributes | 7 +++++++ .travis.yml | 43 ++++++++++++++++++++++++++++++------------- LICENSE | 2 +- composer.json | 9 ++++++--- phpunit.xml.dist | 29 ++++++++++++++--------------- 6 files changed, 67 insertions(+), 32 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitattributes diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..677e36e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9deda0f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +.editorconfig export-ignore +.gitattributes export-ignore +/.github/ export-ignore +.gitignore export-ignore +/.travis.yml export-ignore +/phpunit.xml.dist export-ignore +/tests/ export-ignore diff --git a/.travis.yml b/.travis.yml index 4e00659..c081069 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,37 @@ language: php -php: - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - hhvm - sudo: false -install: - - travis_retry composer install --no-interaction --prefer-source +cache: + directories: + - $HOME/.composer/cache/files + +php: + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - hhvm -script: make test +env: + global: + - TEST_COMMAND="composer test" matrix: - allow_failures: - - php: hhvm - fast_finish: true + allow_failures: + - php: hhvm + fast_finish: true + include: + - php: 5.5 + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" + +before_install: + - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi + +install: + # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 + - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi + - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction + +script: + - $TEST_COMMAND diff --git a/LICENSE b/LICENSE index 581d95f..67f91a1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling +Copyright (c) 2015-2016 Michael Dowling, https://github.com/mtdowling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/composer.json b/composer.json index f13844b..ec41a61 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,5 @@ { "name": "guzzlehttp/promises", - "type": "library", "description": "Guzzle promises library", "keywords": ["promise"], "license": "MIT", @@ -15,7 +14,7 @@ "php": ">=5.5.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0" }, "autoload": { "psr-4": { @@ -23,9 +22,13 @@ }, "files": ["src/functions_include.php"] }, + "scripts": { + "test": "vendor/bin/phpunit", + "test-ci": "vendor/bin/phpunit --coverage-text" + }, "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.4-dev" } } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 500cd53..6ac2da6 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,17 +1,16 @@ - - - - tests - - - - - src - - src/ - - - + + + + tests/ + + + + + src/ + + src/ + + +