PHPackages                             erkineren/shopware-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. erkineren/shopware-sdk

ActiveLibrary[API Development](/categories/api)

erkineren/shopware-sdk
======================

\[Improved\] LeadCommerce PHP SDK for the Shopware 5 REST API.

1.0.2.1(9y ago)050MITPHPPHP &gt;=5.5

Since Jun 14Pushed 6y ago1 watchersCompare

[ Source](https://github.com/erkineren/shopware-sdk)[ Packagist](https://packagist.org/packages/erkineren/shopware-sdk)[ RSS](/packages/erkineren-shopware-sdk/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

\[Edited\] LeadCommerce Shopware SDK
------------------------------------

[](#edited-leadcommerce-shopware-sdk)

Edited PHP SDK for the Shopware 5 REST API.

This repository forked from leadcommerce/shopware-sdk and some arrangements have been made to make it available.

What does this library offer extra as opposed to the original?
--------------------------------------------------------------

[](#what-does-this-library-offer-extra-as-opposed-to-the-original)

- Fixed Bugs (eg. create entity methods exceptions, not found error etc.)
- Edited Lacking Features (eg. Order Entity, methods params)
- Improve Querying (eg. Filter Params)

Main Differences
----------------

[](#main-differences)

- **Querying Responses** `Query\Base` class. Query classes don't return a mapped entity from response anymore. They return itself. In order to get mapped entity like original library you can use `getEntity()`. Also you have 3 options more now :)

    1. `getEntity()` Entity class of query. Returns mapped entity from json response.
    2. `getEntities()` Array of entity classes of query. Returns mapped entities from json response.
    3. `getRawResponse()` Raw string response returned from shopware rest api.
    4. `getArrayResponse()` Json decoded Assosicative Array of raw json response returned from shopware rest api.
- **NotValidApiResponseException** createEntityFromResponse method decodes the json response and resume own logic. If you query the order that not exist or if shopware rest api returns an any error (not json), program will have been failed. But you can catch this error now. If json decode process has error, thie exception is throwed.

Installing
----------

[](#installing)

composer require leadcommerce/shopware-sdk

```
composer require erkineren/shopware-sdk
```

Examples
--------

[](#examples)

```
