Skip to content

Commit 39be2ef

Browse files
committed
Make it possible to create public httplug clients
1 parent 853c4f6 commit 39be2ef

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
44

5+
## 1.12.0 - 2018-10-24
6+
7+
### Added
8+
9+
- Add configuration option to create public clients
10+
511
## 1.11.0 - 2018-07-07
612

713
### Added

DependencyInjection/Configuration.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ private function configureClients(ArrayNodeDefinition $root)
195195
->defaultNull()
196196
->info('The service id of the client to use.')
197197
->end()
198+
->booleanNode('public')
199+
->defaultFalse()
200+
->info('Set to true to make the client service public.')
201+
->end()
198202
->booleanNode('flexible_client')
199203
->defaultFalse()
200204
->info('Set to true to get the client wrapped in a FlexibleHttpClient which emulates async or sync behavior.')

DependencyInjection/HttplugExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ private function configureClient(ContainerBuilder $container, $clientName, array
317317
->register($serviceId.'.client', HttpClient::class)
318318
->setFactory([new Reference($arguments['factory']), 'createClient'])
319319
->addArgument($arguments['config'])
320-
->setPublic(false);
320+
->setPublic($arguments['public']);
321321
} else {
322322
$container
323323
->setAlias($serviceId.'.client', new Alias($arguments['service'], false));

0 commit comments

Comments
 (0)