Skip to content

Commit 1f63526

Browse files
committed
Merge pull request #3 from php-http/implementation
Add Fulfilled and Rejected promise implementations
2 parents 0d0399f + 7e61385 commit 1f63526

17 files changed

+387
-11
lines changed

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@ indent_size = 4
77
indent_style = space
88
insert_final_newline = true
99
trim_trailing_whitespace = true
10-
11-
[*.yml*]
12-
indent_size = 2

.gitattributes

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
.editorconfig export-ignore
2-
.gitattributes export-ignore
3-
.gitignore export-ignore
4-
CONTRIBUTING.md export-ignore
5-
CONDUCT.md export-ignore
1+
spec/ export-ignore
2+
tests/ export-ignore
3+
.editorconfig export-ignore
4+
.gitattributes export-ignore
5+
.gitignore export-ignore
6+
.php_cs export-ignore
7+
.scrutinizer.yml export-ignore
8+
.styleci.yml export-ignore
9+
.travis.yml export-ignore
10+
CONDUCT.md export-ignore
11+
CONTRIBUTING.md export-ignore
12+
phpspec.yml.ci export-ignore
13+
phpspec.yml.dist export-ignore
14+
phpunit.xml.dist export-ignore

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
build/
22
vendor/
33
composer.lock
4+
phpspec.yml
5+
phpunit.xml

.php_cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/*
4+
* In order to make it work, fabpot/php-cs-fixer and sllh/php-cs-fixer-styleci-bridge must be installed globally
5+
* with composer.
6+
*
7+
* @link https://github.com/Soullivaneuh/php-cs-fixer-styleci-bridge
8+
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer
9+
*/
10+
11+
use SLLH\StyleCIBridge\ConfigBridge;
12+
13+
return ConfigBridge::create();

.scrutinizer.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
filter:
2+
paths: [src/*]
3+
checks:
4+
php:
5+
code_rating: true
6+
duplication: true
7+
tools:
8+
external_code_coverage: true

.styleci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
preset: symfony
2+
3+
finder:
4+
exclude:
5+
- "spec"
6+
- "tests"
7+
path:
8+
- "src"
9+
10+
enabled:
11+
- short_array_syntax
12+
13+
disabled:
14+
- unalign_double_arrow

.travis.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
language: php
2+
3+
sudo: false
4+
5+
cache:
6+
directories:
7+
- $HOME/.composer/cache
8+
9+
php:
10+
- 5.4
11+
- 5.5
12+
- 5.6
13+
- 7.0
14+
- hhvm
15+
16+
env:
17+
global:
18+
- TEST_COMMAND="composer test"
19+
20+
branches:
21+
except:
22+
- /^analysis-.*$/
23+
24+
matrix:
25+
fast_finish: true
26+
include:
27+
- php: 5.4
28+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"
29+
30+
before_install:
31+
- travis_retry composer self-update
32+
33+
install:
34+
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
35+
36+
script:
37+
- $TEST_COMMAND
38+
39+
after_success:
40+
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
41+
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ $ git rebase -i HEAD~3
7575
If your branch conflicts with the master branch, you will need to rebase and repush it with the following commands:
7676

7777
``` bash
78-
$ git remote add upstream [email protected]:php-http/repo-name.git
78+
$ git remote add upstream [email protected]:orga/repo-name.git
7979
$ git pull --rebase upstream master
8080
$ git push -f origin feature-or-bug-fix-description
8181
```

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,22 @@ $ composer require php-http/promise
2323
Please see the [official documentation](http://docs.httplug.io).
2424

2525

26+
## Testing
27+
28+
``` bash
29+
$ composer test
30+
```
31+
32+
2633
## Contributing
2734

2835
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
2936

3037

3138
## Security
3239

33-
If you discover any security related issues, please contact us at [[email protected]](mailto:[email protected]).
40+
If you discover any security related issues, please contact us at [[email protected]](mailto:[email protected])
41+
3442

3543

3644
## License

composer.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,22 @@
1414
"email": "[email protected]"
1515
}
1616
],
17+
"require": {
18+
"psr/http-message": "^1.0"
19+
},
20+
"require-dev": {
21+
"phpspec/phpspec": "^2.4",
22+
"henrikbjorn/phpspec-code-coverage" : "^1.0"
23+
},
1724
"autoload": {
1825
"psr-4": {
1926
"Http\\Promise\\": "src/"
2027
}
2128
},
29+
"scripts": {
30+
"test": "vendor/bin/phpspec run",
31+
"test-ci": "vendor/bin/phpspec run -c phpspec.yml.ci"
32+
},
2233
"extra": {
2334
"branch-alias": {
2435
"dev-master": "0.2-dev"

0 commit comments

Comments
 (0)