enm / shopware-sdk-bundle
Symfony integration for enm/shopware-sdk
Installs: 626
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 6
Forks: 0
Open Issues: 1
Type:symfony-bundle
Requires
- php: >=7.0
- enm/shopware-sdk: ^0.1|^0.2|^0.3
- guzzlehttp/guzzle: ^6.2
- jms/serializer-bundle: ^1.1|^2.3
- symfony/config: ^2.7|^3.0|^4.0
- symfony/dependency-injection: ^2.7|^3.0|^4.0
- symfony/http-kernel: ^2.7|^3.0|^4.0
Requires (Dev)
- phpunit/phpunit: ^5.6|^6.0
This package is auto-updated.
Last update: 2019-09-09 12:35:37 UTC
README
A symfony integration for enm/shopware-sdk.
The Bundle provides the default implementation of enm/shopware-sdk
with guzzlehttp/guzzle
and jms/serializer
as service.
It requires the jms/serializer-bundle
to be enabled in the AppKernel
.
Installation
composer require enm/shopware-sdk-bundle
In your AppKernel
:
/**
* @return array
*/
public function registerBundles()
{
$bundles = [
// ...
new \JMS\SerializerBundle\JMSSerializerBundle(),
new \Enm\Bundle\ShopwareSdk\EnmShopwareSdkBundle(),
];
// ...
return $bundles;
}
Configuration
Simply configure your shop connection over the global config.yml
:
enm_shopware_sdk:
base_url: "http://your-shop.com"
username: "test"
api_key: "test"
This bundle overwrites the default naming strategy of the serializer with IdenticalPropertyNamingStrategy
.
Usage
/** @var \Enm\Bundle\ShopwareSdk\EntryPoint $shopwareClient */
$entryPoint = $container->get('enm.shopware.entry_point');
Tests
php vendor/bin/phpunit