Skip to content

Commit 8132139

Browse files
committed
Update package
1 parent 53a0e23 commit 8132139

13 files changed

+142
-61
lines changed

.editorconfig

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
root = true
22

33
[*]
4-
end_of_line = lf
54
charset = utf-8
6-
trim_trailing_whitespace = true
7-
insert_final_newline = true
8-
indent_style = space
5+
end_of_line = lf
96
indent_size = 4
10-
11-
[*.yml*]
127
indent_style = space
13-
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
spec/ export-ignore
2+
tests/ export-ignore
23
.editorconfig export-ignore
34
.gitattributes export-ignore
45
.gitignore export-ignore
6+
.php_cs export-ignore
57
.scrutinizer.yml export-ignore
8+
.styleci.yml export-ignore
69
.travis.yml export-ignore
10+
CONDUCT.md export-ignore
711
CONTRIBUTING.md export-ignore
812
phpspec.yml.ci export-ignore
913
phpspec.yml.dist export-ignore
14+
phpunit.xml.dist export-ignore

.gitignore

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

.php_cs

+13
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

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
filter:
2-
paths: [src/*]
2+
paths: [src/*]
33
checks:
4-
php:
5-
code_rating: true
6-
duplication: true
4+
php:
5+
code_rating: true
6+
duplication: true
77
tools:
8-
external_code_coverage: true
9-
php_code_sniffer:
10-
config:
11-
standard: "PSR2"
8+
external_code_coverage: true

.styleci.yml

+14
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

+32-20
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
11
language: php
22

3+
sudo: false
4+
5+
cache:
6+
directories:
7+
- $HOME/.composer/cache
8+
39
php:
4-
- 5.4
5-
- 5.5
6-
- 5.6
7-
- 7.0
8-
- hhvm
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-.*$/
923

1024
matrix:
11-
allow_failures:
12-
- php: 7.0
13-
- php: hhvm
14-
include:
15-
- php: 5.4
16-
env:
17-
- COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
18-
- COVERAGE=true
19-
- PHPSPEC_FLAGS="-c phpspec.yml.ci"
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
2032

2133
install:
22-
- travis_retry composer self-update
23-
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
34+
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
2435

25-
script: vendor/bin/phpspec run ${PHPSPEC_FLAGS}
36+
script:
37+
- $TEST_COMMAND
2638

27-
after_script:
28-
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
29-
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi
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

CONDUCT.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4+
5+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
6+
7+
Examples of unacceptable behavior by participants include:
8+
9+
* The use of sexualized language or imagery
10+
* Personal attacks
11+
* Trolling or insulting/derogatory comments
12+
* Public or private harassment
13+
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
14+
* Other unethical or unprofessional conduct.
15+
16+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
17+
18+
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
19+
20+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
21+
22+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)

CONTRIBUTING.md

+27-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ please be as precise as possible. Here is a little list of required information:
1515

1616
## Security issues
1717

18-
If you discover any security related issues, please contact us at [[email protected]](mailto:[email protected]) instead of submitting an issue on Github. This allows us to fix the issue and release a security hotfix without publicly disclosing the vulnerability.
18+
If you discover any security related issues,
19+
please contact us at the [security email address](../../#security) instead of submitting an issue on Github.
20+
This allows us to fix the issue and release a security hotfix without publicly disclosing the vulnerability.
1921

2022

2123
## Feature requests
@@ -28,7 +30,8 @@ easily understood/implement it.
2830

2931
## Sending a Pull Request
3032

31-
If you're here, you are going to fix a bug or implement a feature and you're the best! To do it, first fork the repository, clone it and create a new branch with the following commands:
33+
If you're here, you are going to fix a bug or implement a feature and you're the best!
34+
To do it, first fork the repository, clone it and create a new branch with the following commands:
3235

3336
``` bash
3437
$ git clone [email protected]:your-name/repo-name.git
@@ -41,7 +44,12 @@ Then install the dependencies through [Composer](https://getcomposer.org/):
4144
$ composer install
4245
```
4346

44-
Write code and tests. When you are ready, find the testing command in the [README](README.md) and execute it. (This is usually [PHPUnit](http://phpunit.de/) or [PHPSpec](http://phpspec.net/))
47+
Write code and tests. When you are ready, run the tests.
48+
(This is usually [PHPUnit](http://phpunit.de/) or [PHPSpec](http://phpspec.net/))
49+
50+
``` bash
51+
$ composer test
52+
```
4553

4654
When you are ready with the code, tested it and documented it, you can commit and push it with the following commands:
4755

@@ -50,11 +58,15 @@ $ git commit -m "Feature or bug fix description"
5058
$ git push origin feature-or-bug-fix-description
5159
```
5260

53-
**Note:** Please write your commit messages in the imperative and follow the [guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) for clear and concise messages.
61+
**Note:** Please write your commit messages in the imperative and follow the
62+
[guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) for clear and concise messages.
5463

5564
Then [create a pull request](https://help.github.com/articles/creating-a-pull-request/) on GitHub.
5665

57-
Please make sure that each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting with the following commands (here, we assume you would like to squash 3 commits in a single one):
66+
Please make sure that each individual commit in your pull request is meaningful.
67+
If you had to make multiple intermediate commits while developing,
68+
please squash them before submitting with the following commands
69+
(here, we assume you would like to squash 3 commits in a single one):
5870

5971
``` bash
6072
$ git rebase -i HEAD~3
@@ -63,7 +75,7 @@ $ git rebase -i HEAD~3
6375
If your branch conflicts with the master branch, you will need to rebase and repush it with the following commands:
6476

6577
``` bash
66-
$ git remote add upstream [email protected]:php-http/repo-name.git
78+
$ git remote add upstream [email protected]:orga/repo-name.git
6779
$ git pull --rebase upstream master
6880
$ git push -f origin feature-or-bug-fix-description
6981
```
@@ -77,4 +89,12 @@ you must follow these rules.
7789

7890
## Semver
7991

80-
We are trying to follow [semver](http://semver.org/). When you are making BC breaking changes, please let us know why you think it is important. In this case, your patch can only be included in the next major version.
92+
We are trying to follow [semver](http://semver.org/). When you are making BC breaking changes,
93+
please let us know why you think it is important.
94+
In this case, your patch can only be included in the next major version.
95+
96+
97+
## Code of Conduct
98+
99+
This project is released with a [Contributor Code of Conduct](CONDUCT.md).
100+
By participating in this project you agree to abide by its terms.

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,27 @@ Use this client in a testing framework.
2727
## Testing
2828

2929
``` bash
30-
$ phpspec run
30+
$ composer test
3131
```
3232

3333

3434
## Contributing
3535

36-
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
36+
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
3737

3838

3939
## Security
4040

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

4344

4445
## Credits
4546

4647
Thanks to [David de Boer](https://github.com/ddeboer) for implementing this client.
4748

4849

50+
4951
## License
5052

5153
The MIT License (MIT). Please see [License File](LICENSE) for more information.

composer.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "php-http/mock-client",
33
"description": "Mock HTTP client",
44
"license": "MIT",
5-
"keywords": ["boilerplate", "http", "client", "psr7", "mock"],
6-
"homepage": "http://php-http.org",
5+
"keywords": ["http", "client", "psr7", "mock"],
6+
"homepage": "http://httplug.io",
77
"authors": [
88
{
99
"name": "David de Boer",
@@ -16,7 +16,7 @@
1616
"php-http/discovery": "^0.5"
1717
},
1818
"require-dev": {
19-
"phpspec/phpspec": "^2.2",
19+
"phpspec/phpspec": "^2.4",
2020
"henrikbjorn/phpspec-code-coverage" : "^1.0"
2121
},
2222
"provide": {
@@ -27,10 +27,9 @@
2727
"Http\\Mock\\": "src/"
2828
}
2929
},
30-
"autoload-dev": {
31-
"psr-4": {
32-
"Http\\Mock\\Tests\\": "tests/"
33-
}
30+
"scripts": {
31+
"test": "vendor/bin/phpspec run",
32+
"test-ci": "vendor/bin/phpspec run -c phpspec.yml.ci"
3433
},
3534
"extra": {
3635
"branch-alias": {

phpspec.yml.ci

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
suites:
2-
mock_adapter_suite:
3-
namespace: Http\Adapter
4-
psr4_prefix: Http\Adapter
2+
mock_suite:
3+
namespace: Http\Mock
4+
psr4_prefix: Http\Mock
55
formatter.name: pretty
66
extensions:
7-
- PhpSpec\Extension\CodeCoverageExtension
7+
- PhpSpec\Extension\CodeCoverageExtension
88
code_coverage:
9-
format: clover
10-
output: build/coverage.xml
9+
format: clover
10+
output: build/coverage.xml

phpspec.yml.dist

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
suites:
2-
mock_adapter_suite:
3-
namespace: Http\Adapter
4-
psr4_prefix: Http\Adapter
2+
mock_suite:
3+
namespace: Http\Mock
4+
psr4_prefix: Http\Mock
55
formatter.name: pretty

0 commit comments

Comments
 (0)