Download the PHP package marcelsud/shop-api-plugin without Composer
On this page you can find all versions of the php package marcelsud/shop-api-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download marcelsud/shop-api-plugin
More information about marcelsud/shop-api-plugin
Files in marcelsud/shop-api-plugin
Package shop-api-plugin
Short Description Shop API for Sylius E-Commerce.
License MIT
Informations about the package shop-api-plugin
Sylius Shop API

This repository provides a ShopApi implementation on the top of Sylius E-Commerce platform.
Beware
It is also just an addition to Sylius - Standard. Please, check official documentation in order to understand the basic concepts.
Pre - requirements
In order to run this plugin you need to fulfill following requirements:
-
Installed composer Composer.
- Installed Sylius
Rest of the command are executed inside project
folder.
Usage
- Run
composer require sylius/shop-api-plugin
. -
Extend config files:
-
Add SyliusShopApi to AppKernel.
-
Add
- { path: '^/shop-api', priorities: ['json'], fallback_format: json, prefer_extension: true }
tofos_rest.format_listener.rules
section inapp/config/config.yml
file and import config from Plugin. -
Add routing to
app/config/routing.yml
-
Configure firewall
- Change
sylius.security.shop_regex
parameter to excludeshop-api
prefix also - Add ShopAPI regex parameter
shop_api.security.regex: "^/shop-api"
- Add ShopAPI firewall config:
- Change
-
Adjust checkout configuration to not collide with Sylius shop API. For example (assuming, that you are using regular Sylius security definition):
-
(optional) if you have installed
nelmio/NelmioCorsBundle
for Support of Cross-Origin Ajax Request,-
Add the NelmioCorsBundle to the AppKernel
- Add the configuration to the `config.yml
-
-
Additional features
Attributes
If you would like to receive serialized attributes you need to define an array of theirs codes under shop_api.included_attributes
key. E.g.
Authorization
By default no authorization is provided together with this bundle. But it is tested to work along with LexikJWTAuthenticationBundle In order to check example configuration check
- security.yml
- jwt parameters and jwt config in config.yml
- example rsa keys
- login request
From the test app.
Testing
The application can be tested with API Test Case. In order to run test suite execute the following command:
All versions of shop-api-plugin with dependencies
sylius/sylius Version ^1.0
league/tactician-bundle Version ^1.0
league/tactician-doctrine Version ^1.1