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

Commit eea9acc

Browse files
Add section about package selection rules
1 parent a802254 commit eea9acc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ instantiate them.
4545
Althought not required most of the time, you can check which implementation is
4646
used by using the `ConcreteImplementation::*_VENDOR` constants.
4747

48+
The logic to decide which implementation should be installed relies on the
49+
packages that are already found in a project. For example, if one is using
50+
`react/event-loop`, the plugin will select `php-http/react-adapter` (the rules
51+
are declared in `ComposerPlugin`; they're open for discussion.) The missing
52+
packages will be added to the project's composer.json file. This makes it easy
53+
to override the choices of the plugin by explicitly requiring the preferred
54+
implementations.
55+
4856
As of now, the following abstractions are supported:
4957
- php-http/async-client-implementation
5058
- php-http/client-implementation

0 commit comments

Comments
 (0)