-
Notifications
You must be signed in to change notification settings - Fork 56
Added more common errors #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,23 +84,52 @@ Read more about setting up Puli in their `official documentation`_. | |
Common Errors | ||
------------- | ||
|
||
Could not find resource using any discovery strategy | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
If you get an error saying "*Could not find resource using any discovery strategy.*" it means that all the | ||
discovery [#strategies]_ have failed. The cause of this is probably because you have not installed message factories | ||
and/or a PSR-7 implementation. See the :doc:`user documentation <httplug/users>`. | ||
|
||
To resolve this you may run | ||
|
||
.. code-block:: bash | ||
|
||
$ composer require php-http/curl-client guzzlehttp/psr7 php-http/message | ||
|
||
Puli Factory is not available | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
If you get an error that says "*Puli Factory is not available*", it means that you have failed to install Puli. | ||
You should make sure you install the latest version of ``puli/composer-plugin``. | ||
Using Puli is optional and you will be able to use common clients and message factories without Puli | ||
(:doc:`see how <httplug/users>`). If you want to use Puli, make sure to install the latest version of | ||
``puli/composer-plugin``. | ||
|
||
.. code-block:: bash | ||
|
||
$ composer require puli/composer-plugin | ||
|
||
No factories found | ||
^^^^^^^^^^^^^^^^^^ | ||
|
||
The error "*No factories found. To use Guzzle or Diactoros factories install php-http/message and the chosen message implementation.*" | ||
tells you that Puli could not find an installed implementation of PSR-7 and/or factories to that implementation. You | ||
need to install those libraries. If you want to use Guzzle you may run: | ||
The error "*No message factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message | ||
and the chosen message implementation.*" | ||
tells you that no discovery strategy could find an installed implementation of PSR-7 and/or factories for that | ||
implementation. You need to install those libraries. If you want to use Guzzle you may run: | ||
|
||
.. code-block:: bash | ||
|
||
$ composer require php-http/message guzzlehttp/psr7 | ||
|
||
No HTTPlug clients found | ||
^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The error "No HTTPlug clients found. Make sure to install a package providing 'php-http/client-implementation'*" says that | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be consistent, you need to start with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've missed that. Thank you |
||
we cannot find a client. See our :doc:`list of clients <clients>` and install one of them. | ||
|
||
.. code-block:: bash | ||
|
||
$ composer require php-http/curl-client | ||
|
||
HTTP Client Discovery | ||
--------------------- | ||
|
@@ -118,7 +147,7 @@ This type of discovery finds an HTTP Client implementation:: | |
protected $httpClient; | ||
|
||
/** | ||
* @param HttpClient|null $httpClient Client to do HTTP requests, if not set, autodiscovery will be used to find a HTTP client. | ||
* @param HttpClient|null $httpClient Client to do HTTP requests, if not set, auto discovery will be used to find a HTTP client. | ||
*/ | ||
public function __construct(HttpClient $httpClient = null) | ||
{ | ||
|
@@ -142,7 +171,7 @@ This type of discovery finds a HTTP asynchronous Client implementation:: | |
protected $httpAsyncClient; | ||
|
||
/** | ||
* @param HttpAsyncClient|null $httpAsyncClient Client to do HTTP requests, if not set, autodiscovery will be used to find an asynchronous client. | ||
* @param HttpAsyncClient|null $httpAsyncClient Client to do HTTP requests, if not set, auto discovery will be used to find an asynchronous client. | ||
*/ | ||
public function __construct(HttpAsyncClient $httpAsyncClient = null) | ||
{ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cause and because don't work in the same sentence afaik.
Most likely, your project is missing the message factories and/or a PRS-7 implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the "Too many autonumbered footnote references" error is because of
[#strategies]_
- i am not sure what this would be but our other links use the format:ref:
text ``