Skip to content

Commit

Permalink
Improve package
Browse files Browse the repository at this point in the history
Update composer and LICENSE

Update phpunit config

Add some meta files

Update testing
  • Loading branch information
sagikazarmark committed Dec 20, 2016
1 parent d5b0c65 commit e278912
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 32 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
43 changes: 30 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling <[email protected]>
Copyright (c) 2015-2016 Michael Dowling, https://github.com/mtdowling <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "guzzlehttp/promises",
"type": "library",
"description": "Guzzle promises library",
"keywords": ["promise"],
"license": "MIT",
Expand All @@ -15,17 +14,21 @@
"php": ">=5.5.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
"phpunit/phpunit": "^4.0"
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
},
"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"
}
}
}
29 changes: 14 additions & 15 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./tests/bootstrap.php"
colors="true">
<testsuites>
<testsuite>
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src</directory>
<exclude>
<directory suffix="Interface.php">src/</directory>
</exclude>
</whitelist>
</filter>
<phpunit colors="true" bootstrap="tests/bootstrap.php">
<testsuites>
<testsuite name="GuzzleHttp Promise Test Suite">
<directory>tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
<exclude>
<directory suffix="Interface.php">src/</directory>
</exclude>
</whitelist>
</filter>
</phpunit>

0 comments on commit e278912

Please sign in to comment.