Skip to content
This repository was archived by the owner on May 13, 2023. It is now read-only.

Commit 1d8c0b9

Browse files
committed
Update package files
1 parent fb2e1fd commit 1d8c0b9

File tree

6 files changed

+56
-66
lines changed

6 files changed

+56
-66
lines changed

.editorconfig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
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
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
1010

1111
[*.yml*]
12-
indent_style = space
1312
indent_size = 2

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.gitattributes export-ignore
33
.gitignore export-ignore
44
CONTRIBUTING.md export-ignore
5+
CONDUCT.md export-ignore

CONDUCT.md

Lines changed: 22 additions & 0 deletions
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

Lines changed: 26 additions & 6 deletions
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, please contact us at [[email protected]](mailto:[email protected])
19+
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
@@ -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

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -16,62 +16,14 @@ $ composer require php-http/message-factory
1616
```
1717

1818

19-
## Rationale
19+
## Documentation
2020

21-
The FIG was pretty straightforward by NOT putting any construction logic into PSR-7. However there is a need for that. This does not try to be the "de facto" way to do message construction, but tries to provide an easy way to construct messages by following already existing patterns. (For example: `MessageFactory` accepts parameters in the order they appear in a request/response: method, uri, protocol version, headers, body (in case of a request)).
22-
23-
24-
## Usage
25-
26-
This package provides interfaces for PSR-7 factories including:
27-
28-
- `MessageFactory`
29-
- `ServerRequestFactory` - WIP (PRs welcome)
30-
- `StreamFactory`
31-
- `UploadedFileFactory` - WIP (PRs welcome)
32-
- `UriFactory`
33-
- `ClientContextFactory` (Combines `MessageFactory`, `StreamFactory` and `UriFactory`)
34-
35-
36-
A virtual package ([php-http/message-factory-implementation](https://packagist.org/providers/php-http/message-factory-implementation)) MAY be introduced which MUST be versioned together with this package.
37-
38-
39-
### General usage
40-
41-
``` php
42-
use Http\Message\SomeFactory;
43-
44-
class MyFactory implements SomeFactory
45-
{
46-
47-
}
48-
```
49-
50-
51-
### Factory awares and templates
52-
53-
For each factory there is a helper interface and trait to ease injecting them into other objects (such as HTTP clients).
54-
55-
An example:
56-
57-
``` php
58-
use Http\Message\SomeFactoryAware;
59-
use Http\Message\SomeFactoryAwareTemplate;
60-
61-
class HttpClient implements SomeFactoryAware
62-
{
63-
use SomeFactoryAwareTemplate;
64-
}
65-
66-
$client = new HttpClient();
67-
$someFactory = $client->getSomeFactory();
68-
$client->setSomeFactory($someFactory);
69-
```
21+
Please see the [official documentation](http://php-http.readthedocs.org/en/latest/message-factory/).
7022

7123

7224
## Contributing
7325

74-
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
26+
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
7527

7628

7729
## Security

composer.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
"keywords": ["http", "factory", "message", "stream", "uri"],
66
"homepage": "http://php-http.org",
77
"authors": [
8-
{
9-
"name": "Eric GELOEN",
10-
"email": "[email protected]"
11-
},
128
{
139
"name": "Márk Sági-Kazár",
1410
"email": "[email protected]"

0 commit comments

Comments
 (0)