Skip to content

Commit b778b7d

Browse files
committed
General package improvements
1 parent 379678d commit b778b7d

11 files changed

+114
-30
lines changed

.gitattributes

+15-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
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-
CONTRIBUTING export-ignore
11-
phpspec.yml.ci export-ignore
12-
phpspec.yml.dist export-ignore
13-
phpunit.xml.dist export-ignore
1+
.editorconfig export-ignore
2+
.gitattributes export-ignore
3+
/.github/ export-ignore
4+
.gitignore export-ignore
5+
/.php_cs export-ignore
6+
/.scrutinizer.yml export-ignore
7+
/.styleci.yml export-ignore
8+
/.travis.yml export-ignore
9+
/behat.yml.dist export-ignore
10+
/features/ export-ignore
11+
/phpspec.ci.yml export-ignore
12+
/phpspec.yml.dist export-ignore
13+
/phpunit.xml.dist export-ignore
14+
/spec/ export-ignore
15+
/tests/ export-ignore

.github/CONTRIBUTING.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing
2+
3+
Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html).

.github/ISSUE_TEMPLATE.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
| Q | A
2+
| ------------ | ---
3+
| Bug? | no|yes
4+
| New Feature? | no|yes
5+
| Version | Specific version or SHA of a commit
6+
7+
8+
#### Actual Behavior
9+
10+
What is the actual behavior?
11+
12+
13+
#### Expected Behavior
14+
15+
What is the behavior you expect?
16+
17+
18+
#### Steps to Reproduce
19+
20+
What are the steps to reproduce this bug? Please add code examples,
21+
screenshots or links to GitHub repositories that reproduce the problem.
22+
23+
24+
#### Possible Solutions
25+
26+
If you have already ideas how to solve the issue, add them here.
27+
(remove this section if not needed)

.github/PULL_REQUEST_TEMPLATE.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
| Q | A
2+
| --------------- | ---
3+
| Bug fix? | no|yes
4+
| New feature? | no|yes
5+
| BC breaks? | no|yes
6+
| Deprecations? | no|yes
7+
| Related tickets | fixes #X, partially #Y, mentioned in #Z
8+
| Documentation | if this is a new feature, link to pull request in https://github.com/php-http/documentation that adds relevant documentation
9+
| License | MIT
10+
11+
12+
#### What's in this PR?
13+
14+
Explain what the changes in this PR do.
15+
16+
17+
#### Why?
18+
19+
Which problem does the PR fix? (remove this section if you linked an issue above)
20+
21+
22+
#### Example Usage
23+
24+
``` php
25+
// If you added new features, show examples of how to use them here
26+
// (remove this section if not a new feature)
27+
28+
$foo = new Foo();
29+
30+
// Now we can do
31+
$foo->doSomething();
32+
```
33+
34+
35+
#### Checklist
36+
37+
- [ ] Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix
38+
- [ ] Documentation pull request created (if not simply a bugfix)
39+
40+
41+
#### To Do
42+
43+
- [ ] If the PR is not complete but you want to discuss the approach, list what remains to be done here

.gitignore

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
build/
2-
vendor/
3-
composer.lock
4-
phpspec.yml
5-
phpunit.xml
1+
/behat.yml
2+
/build/
3+
/composer.lock
4+
/phpspec.yml
5+
/phpunit.xml
6+
/vendor/

.styleci.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ preset: symfony
33
finder:
44
exclude:
55
- "spec"
6-
- "tests"
76
path:
87
- "src"
8+
- "tests"
99

1010
enabled:
1111
- short_array_syntax
12+
13+
disabled:
14+
- phpdoc_annotation_without_dot # This is still buggy: https://github.com/symfony/symfony/pull/19198

.travis.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ sudo: false
44

55
cache:
66
directories:
7-
- $HOME/.composer/cache
7+
- $HOME/.composer/cache/files
88

99
php:
1010
- 5.5
1111
- 5.6
1212
- 7.0
13+
- 7.1
1314
- hhvm
1415

1516
env:
@@ -27,14 +28,16 @@ matrix:
2728
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"
2829

2930
before_install:
30-
- travis_retry composer self-update
31+
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
3132

3233
install:
33-
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
34+
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
35+
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
36+
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
3437

3538
script:
3639
- $TEST_COMMAND
3740

3841
after_success:
39-
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
40-
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi
42+
- if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
43+
- if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

CONTRIBUTING

-1
This file was deleted.

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,21 @@
1515
Via Composer
1616

1717
``` bash
18-
$ composer require php-http/mock-client
18+
$ composer require --dev php-http/mock-client
1919
```
2020

2121

2222
## Usage
2323

24-
Use this client in a testing framework.
24+
This client does not actually send requests to any server.
25+
26+
Instead it stores the request and returns a pre-set response or throws an exception. This client is useful for unit
27+
testing code that depends on a HTTPlug client to send requests and receive responses.
2528

2629

2730
## Documentation
2831

29-
Please see the [official documentation](http://docs.php-http.org).
32+
Please see the [official documentation](http://docs.php-http.org/en/latest/clients/mock-client.html).
3033

3134

3235
## Testing
@@ -48,7 +51,7 @@ If you discover any security related issues, please contact us at [security@php-
4851

4952
## Credits
5053

51-
Thanks to [David de Boer](https://github.com/ddeboer) for implementing this client.
54+
Thanks to [David de Boer](https://github.com/ddeboer) for implementing the mock client.
5255

5356

5457
## License

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"scripts": {
3333
"test": "vendor/bin/phpspec run",
34-
"test-ci": "vendor/bin/phpspec run -c phpspec.yml.ci"
34+
"test-ci": "vendor/bin/phpspec run -c phpspec.ci.yml"
3535
},
3636
"extra": {
3737
"branch-alias": {
File renamed without changes.

0 commit comments

Comments
 (0)