answear / gls-bundle
Symfony bundle for GLS api.
Installs: 8 792
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.2
- ext-json: *
- guzzlehttp/guzzle: ^6.5|^7.9.2
- psr/log: ^1.1.4
- symfony/http-kernel: ^6.4|^7.0
- symfony/property-access: ^6.4|^7.0
- symfony/property-info: ^6.4|^7.0
- symfony/serializer: ^6.4|^7.0
- webmozart/assert: ^1.11
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- matthiasnoback/symfony-config-test: ^5.2
- phpro/grumphp: ^2.8
- phpstan/phpstan: ^1.12
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^10.5
- roave/security-advisories: dev-master
- symfony/phpunit-bridge: ^6.4|^7.0
README
GLS pickup point integration for Symfony.
Installation
- install with Composer
composer require git@github.com:answear/gls-bundle.git
Answear\GlsBundle\AnswearGlsBundle::class => ['all' => true],
should be added automatically to your config/bundles.php
file by Symfony Flex.
Setup
- provide required config data:
countryCode
# config/packages/answear_gls.yaml answear_gls: countryCode: HU|SK|CZ|RO|SI|HR logger: yourCustomLoggerService #default: null
Logger service must implement Psr\Log\LoggerInterface
interface.
Usage
Get ParcelShops
/** @var \Answear\GlsBundle\Service\ParcelShopsService $parcelShopService **/ $parcelShopService->getParcelShopCollection();
will return \Answear\GlsBundle\Response\DTO\ParcelShop[]
array.
Error handling
Answear\GlsBundle\Exception\ServiceUnavailableException
for allGuzzleException
Final notes
Feel free to open pull requests with new features, improvements or bug fixes. The Answear team will be grateful for any comments.