Skip to content

Add history plugin to the auto discovery client #36

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
Jan 21, 2016
Merged

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Jan 15, 2016

If you do not configure httplug at all it will use the auto discovery client. That client should also have the history plugin injected if you use the toolbar.

Im not 100% confident in this PR. We will as always have two identifiers for the default client: httplug.client and httplug.client.default. This PR makes httplug.client a plugin client but not the other.

Is this okey? The implications would be that you do not see the toolbar when using no configuration and the httplug.client.default service id.

@dbu
Copy link
Collaborator

dbu commented Jan 17, 2016

i guess this is not wrong per se, as the .default is just an alias. but i wonder if we should not handle multiple clients and show multiple icons with tooltip per client service name? or log all requests to one common collection and allow to filter by client service name?

@Nyholm
Copy link
Member Author

Nyholm commented Jan 17, 2016

i guess this is not wrong per se, as the .default is just an alias.

No, the httplug.client.default is the service. httplug.client is the alias. httplug.client.default will by the default be the auto discovery client and httplug.client will be the first configured client or the configured client named default.

but i wonder if we should not handle multiple clients and show multiple icons with tooltip per client service name? or log all requests to one common collection and allow to filter by client service name?

I do not think we should have multiple toolbar icons. But I do think we should requests and responses per client on the profiler page and in the toolbar pop up.

I can write another PR about that.

@sagikazarmark
Copy link
Member

multiple clients and show multiple icons

Not sure if multiple icons is a good idea. My toolbar is big enough already 😝

I agree with @Nyholm, it makes sense on the profiler page. (Don't know how doctrine does this with multiple entity managers, maybe we could look at that)

@@ -88,6 +89,11 @@ protected function configureClients(ContainerBuilder $container, array $config)
// Alias the first client to httplug.client.default
if ($first !== null) {
$container->setAlias('httplug.client.default', 'httplug.client.'.$first);
} elseif (isset($config['_inject_collector_plugin'])) {
// No client was configured. Make sure to inject history plugin to the auto discovery client.
$container->register('httplug.client', PluginClient::class)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was httplug.client not available at all before? or did this happen somewhere else? i am a bit confused by this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

httplug.client was an alias before this line. This register it as a service.

@dbu
Copy link
Collaborator

dbu commented Jan 21, 2016

right, makes more sense to have one report and allow to filter by client. i guess that overlaps somewhat with #26 as well. we don't need to fix this in this PR, lets just make the incremental improvement of not missing out on the auto discovery client.

@dbu dbu mentioned this pull request Jan 21, 2016
@Nyholm
Copy link
Member Author

Nyholm commented Jan 21, 2016

Yeah, I agree that there is some overlapping.

dbu added a commit that referenced this pull request Jan 21, 2016
Add history plugin to the auto discovery client
@dbu dbu merged commit 57763fb into master Jan 21, 2016
@dbu dbu deleted the auto_discovery_client branch January 21, 2016 08:37
@dbu
Copy link
Collaborator

dbu commented Jan 21, 2016

thanks. i added a note to #26 in the description.

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.

3 participants