Skip to content

Commit 9df8e66

Browse files
authored
Merge pull request #179 from fbourigault/display-plugin-fqcn
display plugin fqcn instead of plugin service id
2 parents b893a16 + 9db7289 commit 9df8e66

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Change Log
22

3-
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
3+
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
4+
5+
## Unreleased
6+
7+
### Changed
8+
9+
- Plugins are now displayed with their FQCN instead of service id.
410

511
## 1.6.0 - 2017-05-22
612

Collector/ProfilePlugin.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,24 @@ class ProfilePlugin implements Plugin
3232
*/
3333
private $formatter;
3434

35-
/**
36-
* @var string
37-
*/
38-
private $pluginName;
39-
4035
/**
4136
* @param Plugin $plugin
4237
* @param Collector $collector
4338
* @param Formatter $formatter
44-
* @param string $pluginName
4539
*/
46-
public function __construct(Plugin $plugin, Collector $collector, Formatter $formatter, $pluginName)
40+
public function __construct(Plugin $plugin, Collector $collector, Formatter $formatter)
4741
{
4842
$this->plugin = $plugin;
4943
$this->collector = $collector;
5044
$this->formatter = $formatter;
51-
$this->pluginName = $pluginName;
5245
}
5346

5447
/**
5548
* {@inheritdoc}
5649
*/
5750
public function handleRequest(RequestInterface $request, callable $next, callable $first)
5851
{
59-
$profile = new Profile($this->pluginName);
52+
$profile = new Profile(get_class($this->plugin));
6053

6154
$stack = $this->collector->getCurrentStack();
6255
if (null !== $stack) {

DependencyInjection/HttplugExtension.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,6 @@ private function decoratePluginWithProfilePlugin(ContainerBuilder $container, $p
506506
new Reference($pluginServiceId.'.debug.inner'),
507507
new Reference('httplug.collector.collector'),
508508
new Reference('httplug.collector.formatter'),
509-
$pluginServiceId,
510509
])
511510
->setPublic(false);
512511
}

Tests/Unit/Collector/ProfilePluginTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function testProfileIsInitialized()
141141

142142
$this->assertCount(1, $this->currentStack->getProfiles());
143143
$profile = $this->currentStack->getProfiles()[0];
144-
$this->assertEquals('http.plugin.mock', $profile->getPlugin());
144+
$this->assertEquals(get_class($this->plugin), $profile->getPlugin());
145145
}
146146

147147
public function testCollectRequestInformations()

0 commit comments

Comments
 (0)