Skip to content

Commit 7c0d3ed

Browse files
committed
Initial commit
0 parents  commit 7c0d3ed

File tree

11 files changed

+247
-0
lines changed

11 files changed

+247
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
charset = utf-8
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.yml]
12+
indent_style = space
13+
indent_size = 2

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/tests export-ignore
2+
/.editorconfig export-ignore
3+
/.gitattributes export-ignore
4+
/.gitignore export-ignore
5+
/.scrutinizer.yml export-ignore
6+
/.travis.yml export-ignore
7+
/CONTRIBUTING.md export-ignore
8+
/phpunit.xml.dist export-ignore

.gitignore

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

.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+
tools:
4+
php_analyzer: true
5+
php_mess_detector: true
6+
php_pdepend: true
7+
external_code_coverage:
8+
timeout: '600'

.travis.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
language: php
2+
3+
php:
4+
- 5.4
5+
- 5.5
6+
- 5.6
7+
- 7.0
8+
- hhvm
9+
10+
matrix:
11+
allow_failures:
12+
- php: 7.0
13+
include:
14+
- php: 5.4
15+
env:
16+
- COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
17+
- PHPUNIT_FLAGS="--coverage-clover build/coverage.xml"
18+
- COVERAGE=true
19+
20+
install:
21+
- travis_retry composer self-update
22+
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
23+
24+
script: vendor/bin/phpunit ${PHPUNIT_FLAGS}
25+
26+
after_script:
27+
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
28+
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Change Log
2+
3+
4+
## Unreleased

CONTRIBUTING.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributing
2+
3+
If you're here, you would like to contribute to this repository and you're really welcome!
4+
5+
6+
## Coding standard
7+
8+
This repository follows the [PSR-2 standard](http://www.php-fig.org/psr/psr-2/) and so, if you want to contribute,
9+
you must follow these rules.
10+
11+
12+
## Feature request
13+
14+
If you think a feature is missing, please report it or even better implement it :). If you report it, describe the more
15+
precisely what you would like to see implemented and we will discuss what is the best approach for it. If you can do
16+
some search before submitting it and link the resources to your description, you're awesome! It will allow me to more
17+
easily understood/implement it.
18+
19+
20+
## Bug report
21+
22+
If you think you have detected a bug or a doc issue, please report it or even better fix it :). If you report it,
23+
please be the more precise possible. Here a little list of required informations:
24+
25+
* Precise description of the bug.
26+
27+
28+
## Bug fix
29+
30+
If you're here, you are going to fix a bug and you're the best! To do it, first fork the repository, clone it and
31+
create a new branch with the following commands:
32+
33+
``` bash
34+
$ git clone [email protected]:your-name/repo-name.git
35+
$ git checkout -b bug-fix-description
36+
```
37+
38+
Then, install the dependencies through [Composer](https://getcomposer.org/):
39+
40+
``` bash
41+
$ composer install
42+
```
43+
44+
When you're on the new branch with the dependencies, code as much as you want and when the fix is ready, don't commit
45+
it immediately. Before, you will need to add tests and update the doc. For the tests, everything is tested with
46+
[PHPUnit](http://phpunit.de/) and the doc is in the markdown format under the `doc` directory.
47+
48+
To run the tests, use the following command:
49+
50+
``` bash
51+
$ vendor/bin/phpunit
52+
```
53+
54+
When you have fixed the bug, tested it and documented it, you can commit and push it with the following commands:
55+
56+
``` bash
57+
$ git commit -m "Bug fix description"
58+
$ git push origin bug-fix-description
59+
```
60+
61+
If you have reworked you patch, please squash all your commits in a single one with the following commands (here, we
62+
will assume you would like to squash 3 commits in a single one):
63+
64+
``` bash
65+
$ git rebase -i HEAD~3
66+
```
67+
68+
If your branch conflicts with the master branch, you will need to rebase and repush it with the following commands:
69+
70+
``` bash
71+
$ git remote add upstream [email protected]:php-http/repo-name.git
72+
$ git pull --rebase upstream master
73+
$ git push origin bug-fix-description -f
74+
```

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2014-2015 Eric GELOEN <[email protected]>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# HTTP Adapter
2+
3+
[![Latest Version](https://img.shields.io/github/release/php-http/adapter.svg?style=flat-square)](https://github.com/php-http/adapter/releases)
4+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
5+
[![Build Status](https://img.shields.io/travis/php-http/adapter.svg?style=flat-square)](https://travis-ci.org/php-http/adapter)
6+
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/adapter.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/adapter)
7+
[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/adapter.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/adapter)
8+
[![HHVM Status](https://img.shields.io/hhvm/php-http/adapter.svg?style=flat-square)](http://hhvm.h4cc.de/package/php-http/adapter)
9+
[![Total Downloads](https://img.shields.io/packagist/dt/php-http/adapter.svg?style=flat-square)](https://packagist.org/packages/php-http/adapter)
10+
11+
**HTTP adapter contract.**
12+
13+
14+
## Install
15+
16+
Via Composer
17+
18+
``` bash
19+
$ composer require php-http/adapter
20+
```
21+
22+
23+
## Usage
24+
25+
26+
## Testing
27+
28+
``` bash
29+
$ phpunit
30+
```
31+
32+
33+
## Contributing
34+
35+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
36+
37+
38+
## Security
39+
40+
If you discover any security related issues, please contact us at [[email protected]](mailto:[email protected]).
41+
42+
43+
## License
44+
45+
The MIT License (MIT). Please see [License File](LICENSE) for more information.

composer.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "php-http/adapter",
3+
"description": "HTTP adapter contract",
4+
"license": "MIT",
5+
"keywords": ["http", "adapter"],
6+
"homepage": "http://php-http.org",
7+
"authors": [
8+
{
9+
"name": "Eric GELOEN",
10+
"email": "[email protected]"
11+
}
12+
],
13+
"require": {
14+
"php": ">=5.4"
15+
},
16+
"require-dev": {
17+
"phpunit/phpunit": "~4.4"
18+
},
19+
"autoload": {
20+
"psr-4": {
21+
"Http\\Adapter\\": "src/"
22+
}
23+
},
24+
"extra": {
25+
"branch-alias": {
26+
"dev-master": "0.1-dev"
27+
}
28+
},
29+
"prefer-stable": true,
30+
"minimum-stability": "dev"
31+
}

phpunit.xml.dist

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit colors="true" bootstrap="vendor/autoload.php">
3+
<testsuites>
4+
<testsuite name="Adapter Test Suite">
5+
<directory>tests/</directory>
6+
</testsuite>
7+
</testsuites>
8+
<filter>
9+
<whitelist>
10+
<directory suffix=".php">src/</directory>
11+
</whitelist>
12+
</filter>
13+
</phpunit>

0 commit comments

Comments
 (0)