Skip to content

Commit

Permalink
Added default values in configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
luzrain committed Feb 28, 2024
1 parent 9c8c16a commit 2632ce1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/config/configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@
->scalarNode('http_client')
->isRequired()
->cannotBeEmpty()
->defaultValue('Psr\Http\Client\ClientInterface')
->end()
->scalarNode('request_factory')
->isRequired()
->cannotBeEmpty()
->defaultValue('Psr\Http\Message\RequestFactoryInterface')
->end()
->scalarNode('stream_factory')
->isRequired()
->cannotBeEmpty()
->defaultValue('Psr\Http\Message\StreamFactoryInterface')
->end()
->scalarNode('api_token')
->isRequired()
Expand Down
2 changes: 1 addition & 1 deletion src/config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

return static function (array $config, ContainerBuilder $container) {
$container
->autowire(BotApi::class)
->register(BotApi::class)
->setArguments([
new Reference($config['request_factory']),
new Reference($config['stream_factory']),
Expand Down

0 comments on commit 2632ce1

Please sign in to comment.