enm/shopware-sdk-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Symfony integration for enm/shopware-sdk

Installs: 624

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 6

Forks: 0

Open Issues: 1

Type:symfony-bundle

2.0.4 2019-09-09 12:33 UTC

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.

Build Status SensioLabsInsight

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