Download the PHP package sylius/shop-api-plugin without Composer
On this page you can find all versions of the php package sylius/shop-api-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package shop-api-plugin
Sylius Shop API
[!WARNING]
This plugin is deprecated. The new way of building APIs in Sylius is with Sylius Api.
[!WARNING]
This plugin is deprecated. The new way of building APIs in Sylius is with Sylius Api.
This repository contains a plugin that extends the Sylius eCommerce platform with an API in JSON that allows performing all standard shop operations from the customer perspective.
Documentation
The latest documentation is available here. If you are looking for more information how the system works have a look at the cookbook
Installation
IMPORTANT NOTE: Before installing SyliusShopApiPlugin, you should disable all SyliusShopBundle's dependencies. You cannot use these packages together.
- Run
composer require sylius/shop-api-plugin
and, when asked if you want to execute the Flex recipe, answer 'Yes'. -
Extend config files:
-
Add SyliusShopApi to
config/bundles.php
. -
Add
- { path: '^/shop-api', priorities: ['json'], fallback_format: json, prefer_extension: true }
tofos_rest.format_listener.rules
section inconfig/packages/fos_rest.yaml
file and import config from Plugin. -
Add new routes file to import routes from the SyliusShopApiPlugin
-
Configure firewall
- Change
sylius.security.shop_regex
parameter to excludeshop-api
prefix also - Add ShopAPI regex parameter
sylius_shop_api.security.regex: "^/shop-api"
-
Add ShopAPI firewall config:
-
Symfony 6:
- Symfony 5:
-
- Change
-
(optional) if you have installed
nelmio/NelmioCorsBundle
for Support of Cross-Origin Ajax Request,-
Add the NelmioCorsBundle to the AppKernel
- Add the new configuration file
-
-
- Follow https://github.com/lexik/LexikJWTAuthenticationBundle/blob/master/Resources/doc/index.rst#installation
Sample configuration of Shop API can be found here: https://github.com/Sylius/SyliusDemo/commit/4872350dcd6c987d54dec1f365b4bb890d7183c9
Additional features
Attributes
If you would like to receive serialized attributes you need to define an array of theirs codes under sylius_shop_api.included_attributes
key. E.g.
This plugin comes with an integration with LexikJWTAuthenticationBundle. More information about security customizations may be found there.
Testing
The application can be tested with API Test Case. In order to run test suite execute the following commands:
The application can be also tested with PHPSpec:
Security issues
If you think that you have found a security issue, please do not use the issue tracker and do not post it publicly.
Instead, all security issues must be sent to [email protected]
.
Maintenance
This library is officially maintained by Sylius together with the following contributors outside of the organization:
Release cycle
This projects follows Semantic Versioning. Shop API release cycle is independent from Sylius release cycle.
Next major releases are not planned yet. Minor and patch releases will be published as needed.
We provide bug fixes only for the most recent minor release. We provide security fixes for one year since the release of subsequent minor release.
Supported versions
Version | Release date | End of support |
---|---|---|
1.0 | 23rd Nov 2019 | 19th June 2021 |
1.1 | 19th June 2020 | 08th December 2020 |
1.2 | 08th December 2020 | 22th April 2021 |
1.2.1 | 22th April 2021 | 22th April 2021 |
1.3 | 22th April 2021 | 22th April 2021 |
1.3.1 | 22th April 2021 | 30th June 2021 |
1.4 | 30th June 2021 | 06th July 2021 |
1.4.1 | 06th July 2021 | 20th July 2022 |
1.5 | 20th July 2022 | 21th July 2022 |
1.5.1 | 21th July 2022 | 13th January 2023 |
1.6 | 13th January 2023 |
All versions of shop-api-plugin with dependencies
sylius/sylius Version ~1.11.10 || ~1.12.0
lexik/jwt-authentication-bundle Version ^2.5
symfony/messenger Version ^5.4 || ^6.0
doctrine/doctrine-bundle Version ^2.0