Skip to content

Commit a4b6364

Browse files
committed
make plugin service templates abstract to avoid warning
1 parent 6021ece commit a4b6364

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
1010
- Register PSR-17 / PSR-18 classes as services
1111
- Allow to configure cache listeners on the cache plugin
1212

13+
### Changed
14+
15+
- Define plugin service templates as abstract to avoid warnings from Symfony
16+
1317
## 1.17.0 - 2019-12-27
1418

1519
### Added

src/DependencyInjection/HttplugExtension.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ private function configurePluginByName($name, Definition $definition, array $con
224224
$definition
225225
->replaceArgument(0, new Reference($config['cache_pool']))
226226
->replaceArgument(1, new Reference($config['stream_factory']))
227-
->replaceArgument(2, $options);
227+
->replaceArgument(2, $options)
228+
->setAbstract(false)
229+
;
228230

229231
break;
230232

@@ -250,6 +252,7 @@ private function configurePluginByName($name, Definition $definition, array $con
250252
if (!empty($config['formatter'])) {
251253
$definition->replaceArgument(1, new Reference($config['formatter']));
252254
}
255+
$definition->setAbstract(false);
253256

254257
break;
255258

@@ -269,7 +272,10 @@ private function configurePluginByName($name, Definition $definition, array $con
269272
break;
270273

271274
case 'stopwatch':
272-
$definition->replaceArgument(0, new Reference($config['stopwatch']));
275+
$definition
276+
->replaceArgument(0, new Reference($config['stopwatch']))
277+
->setAbstract(false)
278+
;
273279

274280
break;
275281

src/Resources/config/plugins.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
55

66
<services>
7-
<service id="httplug.plugin.cache" class="Http\Client\Common\Plugin\CachePlugin" public="false">
7+
<service id="httplug.plugin.cache" class="Http\Client\Common\Plugin\CachePlugin" public="false" abstract="true">
88
<argument />
99
<argument />
1010
<argument />
@@ -18,13 +18,13 @@
1818
<service id="httplug.plugin.history" class="Http\Client\Common\Plugin\HistoryPlugin" public="false">
1919
<argument />
2020
</service>
21-
<service id="httplug.plugin.logger" class="Http\Client\Common\Plugin\LoggerPlugin" public="false">
21+
<service id="httplug.plugin.logger" class="Http\Client\Common\Plugin\LoggerPlugin" public="false" abstract="true">
2222
<argument />
2323
<argument>null</argument>
2424
</service>
2525
<service id="httplug.plugin.redirect" class="Http\Client\Common\Plugin\RedirectPlugin" public="false" />
2626
<service id="httplug.plugin.retry" class="Http\Client\Common\Plugin\RetryPlugin" public="false" />
27-
<service id="httplug.plugin.stopwatch" class="Http\Client\Common\Plugin\StopwatchPlugin" public="false">
27+
<service id="httplug.plugin.stopwatch" class="Http\Client\Common\Plugin\StopwatchPlugin" public="false" abstract="true">
2828
<argument />
2929
</service>
3030

0 commit comments

Comments
 (0)