ShopApiPlugin | Shop API for Sylius. | REST library
kandi X-RAY | ShopApiPlugin Summary
kandi X-RAY | ShopApiPlugin Summary
ShopApiPlugin is a PHP library typically used in Web Services, REST, Symfony applications. ShopApiPlugin has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.
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.
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.
Support
Quality
Security
License
Reuse
Support
ShopApiPlugin has a low active ecosystem.
It has 130 star(s) with 92 fork(s). There are 27 watchers for this library.
It had no major release in the last 12 months.
There are 44 open issues and 218 have been closed. On average issues are closed in 155 days. There are 7 open pull requests and 0 closed requests.
It has a neutral sentiment in the developer community.
The latest version of ShopApiPlugin is v1.6.0
Quality
ShopApiPlugin has 0 bugs and 227 code smells.
Security
ShopApiPlugin has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
ShopApiPlugin code analysis shows 0 unresolved vulnerabilities.
There are 2 security hotspots that need review.
License
ShopApiPlugin does not have a standard license declared.
Check the repository for any license declaration and review the terms closely.
Without a license, all rights are reserved, and you cannot use the library in your applications.
Reuse
ShopApiPlugin releases are available to install and integrate.
Installation instructions, examples and code snippets are available.
ShopApiPlugin saves you 10675 person hours of effort in developing the same functionality from scratch.
It has 23356 lines of code, 1551 functions and 591 files.
It has low code complexity. Code complexity directly impacts maintainability of the code.
Top functions reviewed by kandi - BETA
kandi has reviewed ShopApiPlugin and discovered the below as its top functions. This is intended to give you an instant insight into ShopApiPlugin implemented functionality, and help decide if they suit your requirements.
- Has invalid product variants .
- Builds the product variant view .
- Builds the product view .
- Creates a new placed order view .
- Creates a new cart view with the given promotion code .
- Throws an exception if nothing is missing .
- It is used to create new addresses for the order .
- Creates a new address from address data .
- Build view classes configuration node .
- Adds a violation to the cart if a cart item is not valid .
Get all kandi verified functions for this library.
ShopApiPlugin Key Features
No Key Features are available at this moment for ShopApiPlugin.
ShopApiPlugin Examples and Code Snippets
No Code Snippets are available at this moment for ShopApiPlugin.
Community Discussions
Trending Discussions on ShopApiPlugin
QUESTION
Symfony doesn't take me the handler of an API
Asked 2020-Jul-25 at 20:57
I am doing an API in a framework called Sylius that uses the symfony framework as a base. I am currently not recognized by the API controller class that solves the API logic
I have a controller with its respective declaration:
...ANSWER
Answered 2020-Jul-25 at 20:57As there were two different namespaces in the main project I had to clear cache:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ShopApiPlugin
Run composer require sylius/shop-api-plugin and, when asked if you want to execute the Flex recipe, answer 'Yes'. Sample configuration of Shop API can be found here: https://github.com/Sylius/SyliusDemo/commit/4872350dcd6c987d54dec1f365b4bb890d7183c9.
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. // config/bundles.php return [ Sylius\ShopApiPlugin\SyliusShopApiPlugin::class => ['all' => true], ]; Add - { path: '^/shop-api', priorities: ['json'], fallback_format: json, prefer_extension: true } to fos_rest.format_listener.rules section in config/packages/fos_rest.yaml file and import config from Plugin. # config/packages/_sylius_shop_api.yaml imports: # <-- Add this section if it does not already exist and add the lines below # ... - { resource: "@SyliusShopApiPlugin/Resources/config/app/config.yml" } - { resource: "@SyliusShopApiPlugin/Resources/config/app/sylius_mailer.yml" } # config/packages/fos_rest.yaml fos_rest: # ... format_listener: rules: - { path: '^/shop-api', priorities: ['json'], fallback_format: json, prefer_extension: true } # <-- Add this - { path: '^/api', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true } - { path: '^/', stop: true } Add new routes file to import routes from the SyliusShopApiPlugin # config/routes/sylius_shop_api.yaml sylius_shop_api: resource: "@SyliusShopApiPlugin/Resources/config/routing.yml" Configure firewall Change sylius.security.shop_regex parameter to exclude shop-api prefix also Add ShopAPI regex parameter sylius_shop_api.security.regex: "^/shop-api" Add ShopAPI firewall config: # config/packages/security.yaml parameters: # ... sylius.security.shop_regex: "^/(?!admin|api/.*|api$|shop-api|media/.*)[^/]++" # shop-api has been added inside the brackets sylius_shop_api.security.regex: "^/shop-api" # ... security: firewalls: // ... sylius_shop_api: pattern: "%sylius_shop_api.security.regex%" stateless: true anonymous: true provider: sylius_shop_user_provider json_login: check_path: /shop-api/login username_path: email password_path: password success_handler: lexik_jwt_authentication.handler.authentication_success failure_handler: lexik_jwt_authentication.handler.authentication_failure guard: authenticators: - lexik_jwt_authentication.jwt_token_authenticator access_control: - { path: "%sylius_shop_api.security.regex%/address-book", role: ROLE_USER} - { path: "%sylius_shop_api.security.regex%/me", role: ROLE_USER} (optional) if you have installed nelmio/NelmioCorsBundle for Support of Cross-Origin Ajax Request, Add the NelmioCorsBundle to the AppKernel // config/bundles.php return [ Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], ]; Add the new configuration file # config/packages/nelmio_cors.yml # ... nelmio_cors: defaults: allow_credentials: false allow_origin: [] allow_headers: [] allow_methods: [] expose_headers: [] max_age: 0 hosts: [] origin_regex: false forced_allow_origin_value: ~ paths: '^/shop-api/': allow_origin: ['*'] allow_headers: ['Content-Type', 'authorization'] allow_methods: ['POST', 'PUT', 'GET', 'DELETE', 'PATCH', 'OPTIONS'] max_age: 3600
Follow https://github.com/lexik/LexikJWTAuthenticationBundle/blob/master/Resources/doc/index.md#installation
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. // config/bundles.php return [ Sylius\ShopApiPlugin\SyliusShopApiPlugin::class => ['all' => true], ]; Add - { path: '^/shop-api', priorities: ['json'], fallback_format: json, prefer_extension: true } to fos_rest.format_listener.rules section in config/packages/fos_rest.yaml file and import config from Plugin. # config/packages/_sylius_shop_api.yaml imports: # <-- Add this section if it does not already exist and add the lines below # ... - { resource: "@SyliusShopApiPlugin/Resources/config/app/config.yml" } - { resource: "@SyliusShopApiPlugin/Resources/config/app/sylius_mailer.yml" } # config/packages/fos_rest.yaml fos_rest: # ... format_listener: rules: - { path: '^/shop-api', priorities: ['json'], fallback_format: json, prefer_extension: true } # <-- Add this - { path: '^/api', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true } - { path: '^/', stop: true } Add new routes file to import routes from the SyliusShopApiPlugin # config/routes/sylius_shop_api.yaml sylius_shop_api: resource: "@SyliusShopApiPlugin/Resources/config/routing.yml" Configure firewall Change sylius.security.shop_regex parameter to exclude shop-api prefix also Add ShopAPI regex parameter sylius_shop_api.security.regex: "^/shop-api" Add ShopAPI firewall config: # config/packages/security.yaml parameters: # ... sylius.security.shop_regex: "^/(?!admin|api/.*|api$|shop-api|media/.*)[^/]++" # shop-api has been added inside the brackets sylius_shop_api.security.regex: "^/shop-api" # ... security: firewalls: // ... sylius_shop_api: pattern: "%sylius_shop_api.security.regex%" stateless: true anonymous: true provider: sylius_shop_user_provider json_login: check_path: /shop-api/login username_path: email password_path: password success_handler: lexik_jwt_authentication.handler.authentication_success failure_handler: lexik_jwt_authentication.handler.authentication_failure guard: authenticators: - lexik_jwt_authentication.jwt_token_authenticator access_control: - { path: "%sylius_shop_api.security.regex%/address-book", role: ROLE_USER} - { path: "%sylius_shop_api.security.regex%/me", role: ROLE_USER} (optional) if you have installed nelmio/NelmioCorsBundle for Support of Cross-Origin Ajax Request, Add the NelmioCorsBundle to the AppKernel // config/bundles.php return [ Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], ]; Add the new configuration file # config/packages/nelmio_cors.yml # ... nelmio_cors: defaults: allow_credentials: false allow_origin: [] allow_headers: [] allow_methods: [] expose_headers: [] max_age: 0 hosts: [] origin_regex: false forced_allow_origin_value: ~ paths: '^/shop-api/': allow_origin: ['*'] allow_headers: ['Content-Type', 'authorization'] allow_methods: ['POST', 'PUT', 'GET', 'DELETE', 'PATCH', 'OPTIONS'] max_age: 3600
Follow https://github.com/lexik/LexikJWTAuthenticationBundle/blob/master/Resources/doc/index.md#installation
Support
The latest documentation is available here. If you are looking for more information how the system works have a look at the cookbook.
Find more information at:
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page