Skip to content

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

Merged
merged 1 commit into from
Feb 17, 2016
Merged

Update discovery documentation #85

merged 1 commit into from
Feb 17, 2016

Conversation

sagikazarmark
Copy link
Member

No description provided.

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.
Copy link
Contributor

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).

Copy link
Member Author

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.

@dbu
Copy link
Contributor

dbu commented Feb 12, 2016

thanks for the write up. i added some suggestions for clarifications, but like the way this article is going.

@sagikazarmark
Copy link
Member Author

Thanks for the review. I will add some corrections shortly.

@dbu
Copy link
Contributor

dbu commented Feb 17, 2016

@sagikazarmark can we wrap this one up?

@dbu
Copy link
Contributor

dbu commented Feb 17, 2016

does this fix #14 btw?

@sagikazarmark
Copy link
Member Author

Don't think this one does, but looking at the message factory docs, it's not outdated, but incomplete.

@sagikazarmark
Copy link
Member Author

Pushed fixes

"version": "1.0",
"name": "php-http/guzzle6-adapter",
"bindings": {
"04b5a002-71a8-473d-a8df-75671551b84a": {
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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?

@sagikazarmark
Copy link
Member Author

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.
Copy link
Contributor

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"

@dbu
Copy link
Contributor

dbu commented Feb 17, 2016

one last nitpick. when that is good, go ahead and merge.

@sagikazarmark
Copy link
Member Author

My text engine does not work nowadays. 😞

Add Puli to spell check

Add fixes
sagikazarmark added a commit that referenced this pull request Feb 17, 2016
@sagikazarmark sagikazarmark merged commit bbf40c2 into master Feb 17, 2016
@sagikazarmark sagikazarmark deleted the rewrite_discovery branch February 17, 2016 10:33
shulard pushed a commit to shulard/documentation that referenced this pull request Feb 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants