inspirum / balikobot-symfony
Symfony bundle for inspirum/balikobot library
Installs: 5 984
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- inspirum/balikobot: ^7.6
- symfony/config: ^6.1 || ^7.0
- symfony/dependency-injection: ^6.1 || ^7.0
- symfony/http-kernel: ^6.1 || ^7.0
Requires (Dev)
- inspirum/coding-standard: ^1.4
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.5
- shipmonk/composer-dependency-analyser: ^1.5
- squizlabs/php_codesniffer: ^3.9
- symfony/filesystem: ^6.1 || ^7.0
- symfony/yaml: ^6.1 || ^7.0
This package is auto-updated.
Last update: 2024-12-17 13:44:08 UTC
README
Symfony integration for inspirum/balikobot
.
Installation
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)%'
Usage
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(...)
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email tomas.novotny@inspirum.cz instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.