@@ -36,7 +36,6 @@ Strategies
36
36
The package supports multiple discovery strategies and comes with two out-of-the-box:
37
37
38
38
- A built-in strategy supporting the HTTPlug adapters, clients and factories (including Symfony, Guzzle, Diactoros and Slim Framework)
39
- - A strategy supporting the beta version of `Puli `_
40
39
41
40
Strategies provide candidates of a type which gets evaluated by the discovery service.
42
41
When it finds the best candidate, it caches it and stops looking in further strategies.
@@ -50,41 +49,6 @@ Installation
50
49
$ composer require php-http/discovery
51
50
52
51
53
- Using Puli
54
- ^^^^^^^^^^
55
-
56
- `Puli `_ is a first class citizen, but completely optional strategy in discovery.
57
- It provides better flexibility than the built-in strategy, but requires more configuration.
58
-
59
- There are two kinds of installation:
60
-
61
- - In an application
62
- - In a reusable library (for development)
63
-
64
- In both cases you have to install the discovery package itself and set up Puli.
65
- The easiest way is installing the composer-plugin which automatically configures
66
- all the composer packages to act as Puli modules.
67
-
68
- For applications, simply do:
69
-
70
- .. code-block :: bash
71
-
72
- $ composer require puli/composer-plugin
73
-
74
-
75
- If you need the composer-plugin for development or testing in a reusable library,
76
- make it a development dependency instead:
77
-
78
- .. code-block :: bash
79
-
80
- $ composer require --dev puli/composer-plugin
81
-
82
- All of our packages provide Puli resources too, so if Puli is installed, discovery will use it as the primary strategy
83
- and fall back to the built-in list.
84
-
85
- Read more about setting up Puli in their `official documentation `_.
86
-
87
-
88
52
Common Errors
89
53
-------------
90
54
@@ -102,19 +66,6 @@ To resolve this you may run
102
66
103
67
$ composer require php-http/curl-client guzzlehttp/psr7 php-http/message
104
68
105
- Puli Factory is not available
106
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107
-
108
- If you get an error that says "*Puli Factory is not available *", it means that you
109
- have failed to install Puli. Using Puli is optional and you will be able to use
110
- common clients and message factories without Puli (:doc: `see how <httplug/users >`).
111
- If you want to use Puli, make sure to install the latest version of
112
- ``puli/composer-plugin ``.
113
-
114
- .. code-block :: bash
115
-
116
- $ composer require puli/composer-plugin
117
-
118
69
No factories found
119
70
^^^^^^^^^^^^^^^^^^
120
71
@@ -339,24 +290,5 @@ It is important to note that you must explicitly enable the ``MockClientStrategy
339
290
and that it is not used by the Discovery Service by default. It is simply
340
291
provided as a convenient option when writing tests.
341
292
342
- Integrating your own implementation with the discovery mechanism using Puli
343
- ---------------------------------------------------------------------------
344
-
345
- If you use `Puli `_ you can easily make your own HTTP Client or Message Factory discoverable:
346
- you have to configure it as a Puli resource (`binding `_ in Puli terminology).
347
-
348
- A binding must have a type, called `binding-type `_. All of our interfaces are registered as binding types.
349
-
350
- For example: a client ``Http\Client\MyClient `` should be bind to ``Http\Client\HttpClient ``
351
-
352
- Puli uses a ``puli.json `` file for configuration (placed in the package root).
353
- Use the CLI tool for configuring bindings. It is necessary, because each binding must have a unique identifier.
354
- Read more in Puli's documentation (`Providing Resources `_).
355
-
356
- .. _`Puli` : http://puli.io
357
- .. _official documentation : http://docs.puli.io/en/latest
358
- .. _`binding` : http://docs.puli.io/en/latest/glossary.html#glossary-binding
359
- .. _`binding-type` : http://docs.puli.io/en/latest/glossary.html#glossary-binding-type
360
- .. _Providing Resources : http://docs.puli.io/en/latest/discovery/providing-resources.html
361
293
.. _PSR-17 : http://www.php-fig.org/psr/psr-17
362
294
.. _PSR-18 : http://www.php-fig.org/psr/psr-18
0 commit comments