Skip to content

Commit e578b59

Browse files
committed
Improve Message Factory documentation
1 parent 97f4dab commit e578b59

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

docs/components/message-factory.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
## Rationale
77

88
While it should be possible to use every PSR-7 aware HTTP client with any RequestInterface implementation,
9-
creating the request objects will still tie an application to a specific implementation.
10-
In the case of reusable libraries, an application could end up installing several request implementations.
9+
creating the request objects will still tie the code to a specific implementation.
10+
If each reusable library is tied to a specific message implementation,
11+
an application could end up installing several message implementations.
1112
The factories abstract away from this.
1213

1314
The FIG was pretty straightforward by NOT putting any construction logic into PSR-7.
@@ -23,22 +24,3 @@ This package provides interfaces for PSR-7 factories including:
2324
- `StreamFactory`
2425
- `UploadedFileFactory` - WIP (PRs welcome)
2526
- `UriFactory`
26-
27-
28-
A [virtual package](/httplug/virtual-package) ([php-http/message-factory-implementation](https://packagist.org/providers/php-http/message-factory-implementation))
29-
MAY be introduced which MUST be versioned together with this package.
30-
31-
The adapter repositories provide wrapper classes for those factories to
32-
implement the `Http\Message\MessageFactory` interface.
33-
34-
35-
### General usage
36-
37-
``` php
38-
use Http\Message\SomeFactory;
39-
40-
class MyFactory implements SomeFactory
41-
{
42-
43-
}
44-
```

0 commit comments

Comments
 (0)