Skip to content

Commit ff76ad4

Browse files
authored
make plugin service templates abstract to avoid warning (#383)
1 parent 47bd422 commit ff76ad4

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
1111
- Allow to configure cache listeners on the cache plugin
1212

1313
### Changed
14-
- tests are excluded from zip releases
14+
15+
- Tests are excluded from zip releases
16+
- Define plugin service templates as abstract to avoid warnings from Symfony
1517

1618
## 1.17.0 - 2019-12-27
1719

src/DependencyInjection/HttplugExtension.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ private function configurePluginByName($name, Definition $definition, array $con
216216
$definition
217217
->replaceArgument(0, new Reference($config['cache_pool']))
218218
->replaceArgument(1, new Reference($config['stream_factory']))
219-
->replaceArgument(2, $options);
219+
->replaceArgument(2, $options)
220+
->setAbstract(false)
221+
;
220222

221223
break;
222224

@@ -242,6 +244,7 @@ private function configurePluginByName($name, Definition $definition, array $con
242244
if (!empty($config['formatter'])) {
243245
$definition->replaceArgument(1, new Reference($config['formatter']));
244246
}
247+
$definition->setAbstract(false);
245248

246249
break;
247250

@@ -261,7 +264,10 @@ private function configurePluginByName($name, Definition $definition, array $con
261264
break;
262265

263266
case 'stopwatch':
264-
$definition->replaceArgument(0, new Reference($config['stopwatch']));
267+
$definition
268+
->replaceArgument(0, new Reference($config['stopwatch']))
269+
->setAbstract(false)
270+
;
265271

266272
break;
267273

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)