-
Notifications
You must be signed in to change notification settings - Fork 56
Update discovery documentation #85
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
Conversation
5a61733
to
3ce0c4d
Compare
The discovery service allows to find and use installed resources. | ||
Under the hood it uses `Puli`_ for the discovery logic. All of our packages provide Puli resources which means they | ||
could even be used without this convenience wrapper. (For example HttplugBundle only relies on Puli). | ||
However, in some cases you need to be able to statically access the discovery layer (when DI is not an option). | ||
This is useful in libraries that want to offer zero-configuration services and rely only on the virtual packages. |
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.
All of our packages provide Puli resources. Discovery is simply a convenience wrapper to statically access clients and factories for when Dependency Injection is not an option. Discovery is useful in libraries that want to offer zero-configuration services relying on the virtual packages [link to virtual packages doc]. If you have Dependency Injection available, using Puli directly is more elegant (see for example the Symfony HttplugBundle
).
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.
It seems to me that the virtual-package doc has been split/moved.
thanks for the write up. i added some suggestions for clarifications, but like the way this article is going. |
Thanks for the review. I will add some corrections shortly. |
@sagikazarmark can we wrap this one up? |
does this fix #14 btw? |
Don't think this one does, but looking at the message factory docs, it's not outdated, but incomplete. |
62f0a0f
to
35b15b7
Compare
Pushed fixes |
"version": "1.0", | ||
"name": "php-http/guzzle6-adapter", | ||
"bindings": { | ||
"04b5a002-71a8-473d-a8df-75671551b84a": { |
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.
i am sure that the puli doc explains, but for those that don't click on links: can you tell how to determine those uuids? randomly pick one and hope there is no collision?
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.
I explain that later:
Puli provides a CLI tool for configuring bindings. It is necessary, because each binding must have a unique identifier.
Maybe we need to explain it a bit more.
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 just explain the tool instead of showing the file then?
35b15b7
to
a5db4c0
Compare
Removed file examples |
], | ||
] | ||
Puli uses a ``puli.json`` file for configuration (placed in the package root). | ||
You can use the CLI tool for configuring bindings. It is necessary, because each binding must have a unique identifier. |
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.
"You can use the CLI tool" => "Use the CLI tool"
one last nitpick. when that is good, go ahead and merge. |
a5db4c0
to
00d7ff1
Compare
My text engine does not work nowadays. 😞 |
Add Puli to spell check Add fixes
Update discovery documentation
Update discovery documentation
No description provided.