Symfony integration for inspirum/balikobot
.
Run composer require command:
composer require inspirum/balikobot-symfony
Enable bundle by adding it to the list of registered bundles in the config/bundles.php
file of your project:
<?php
return [
// ...
Inspirum\Balikobot\Integration\Symfony\BalikobotBundle::class => ['all' => true],
];
Configure client credentials by adding config/packages/balikobot.yaml
and setting the env variables:
balikobot:
connections:
default:
api_user: '%env(resolve:BALIKOBOT_API_USER)%'
api_key: '%env(resolve:BALIKOBOT_API_KEY)%'
You can use multiple client credentials
balikobot:
default_connection: 'client2'
connections:
client1:
api_user: '%env(resolve:BALIKOBOT_API_USER_1)%'
api_key: '%env(resolve:BALIKOBOT_API_KEY_1)%'
client2:
api_user: '%env(resolve:BALIKOBOT_API_USER_2)%'
api_key: '%env(resolve:BALIKOBOT_API_KEY_2)%'
client3:
api_user: '%env(resolve:BALIKOBOT_API_USER_3)%'
api_key: '%env(resolve:BALIKOBOT_API_KEY_3)%'
Use ServiceContainerRegistry
to get ServiceContainer
for given connection.
/** @var Inspirum\Balikobot\Service\Registry\ServiceContainerRegistry $registry */
// get package service for default (or first) connection
$packageService = $registry->get()->getPackageService();
// get branch service for "client3" connection
$packageService = $registry->get('client3')->getBranchService();
or use services directly for default connection
/** @var Inspirum\Balikobot\Service\PackageService $packageService */
$packageService->addPackages(...)
/** @var Inspirum\Balikobot\Service\BranchService $branchService */
$branchService->getBranches(...)
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email tomas.novotny@inspirum.cz instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.