agence-adeliom / easy-shop-bundle
Symfony Shop bundle for EasyAdmin based on Sylius
Installs: 1 945
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 9
Type:symfony-bundle
Requires
- php: ^7.4|^8.0
- ext-json: *
- a2lix/translation-form-bundle: ^3.0
- agence-adeliom/easy-fields-bundle: ^1.0
- agence-adeliom/easy-page-bundle: ^1.0
- easycorp/easyadmin-bundle: ^3.4 || ^v4.0.0
- sylius/sylius: ^1.10
- symfony/config: ^4.4 || ^5.2
- symfony/dependency-injection: ^4.4 || ^5.2
- symfony/deprecation-contracts: ^2.2 || ^v3.0.0
- symfony/event-dispatcher: ^4.4 || ^5.2
- symfony/framework-bundle: ^4.4 || ^5.2
- symfony/http-kernel: ^4.4 || ^5.2
- symfony/options-resolver: ^4.4 || ^5.2
- symfony/property-access: ^4.4 || ^5.2
- twig/extra-bundle: ^2.12|^3.0
Conflicts
- doctrine/dbal: ^3.0
- dev-main
- 2.0.0
- 1.1.0
- 1.0.0
- dev-dependabot/npm_and_yarn/json5-1.0.2
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/qs-and-qs-and-express-6.11.0
- dev-dependabot/npm_and_yarn/loader-utils-1.4.2
- dev-develop
- dev-dependabot/npm_and_yarn/terser-4.8.1
- dev-dependabot/npm_and_yarn/npm-8.11.0
- dev-dependabot/npm_and_yarn/nanoid-3.3.4
- dev-dependabot/npm_and_yarn/async-2.6.4
- dev-dependabot/npm_and_yarn/follow-redirects-1.14.8
This package is auto-updated.
Last update: 2024-11-07 15:26:57 UTC
README
Easy Shop Bundle
Implentation of Sylius into Easyadmin
Installation
Install with composer
composer require agence-adeliom/easy-shop-bundle bin/console sylius:install:check-requirements
Documentation
Configure security.yaml
Encoders
security: encoders: ... Sylius\Component\User\Model\UserInterface: argon2i
Providers
security: ... providers: ... sylius_api_admin_user_provider: id: sylius.admin_user_provider.email_or_name_based sylius_shop_user_provider: id: sylius.shop_user_provider.email_or_name_based sylius_api_shop_user_provider: id: sylius.shop_user_provider.email_or_name_based
Firewalls
security: ... access_control: ... new_api_admin_user: pattern: "%sylius.security.new_api_admin_regex%/.*" provider: sylius_api_admin_user_provider stateless: true json_login: check_path: "%sylius.security.new_api_admin_route%/authentication-token" 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 new_api_shop_user: pattern: "%sylius.security.new_api_shop_regex%/.*" provider: sylius_api_shop_user_provider stateless: true json_login: check_path: "%sylius.security.new_api_shop_route%/authentication-token" 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 shop: switch_user: { role: ROLE_ALLOWED_TO_SWITCH } context: shop pattern: "%sylius.security.shop_regex%" provider: sylius_shop_user_provider form_login: success_handler: sylius.authentication.success_handler failure_handler: sylius.authentication.failure_handler provider: sylius_shop_user_provider login_path: sylius_shop_login check_path: sylius_shop_login_check failure_path: sylius_shop_login default_target_path: sylius_shop_homepage use_forward: false use_referer: true remember_me: secret: "%env(APP_SECRET)%" name: APP_SHOP_REMEMBER_ME lifetime: 31536000 remember_me_parameter: _remember_me logout: path: sylius_shop_logout target: sylius_shop_login invalidate_session: false
Access controls
security: ... access_control: ... - { path: "%sylius.security.shop_regex%", role: PUBLIC_ACCESS } - { path: "%sylius.security.shop_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [ 127.0.0.1, ::1 ] } - { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS } - { path: "%sylius.security.shop_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: "%sylius.security.shop_regex%/register", role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: "%sylius.security.shop_regex%/verify", role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: "%sylius.security.shop_regex%/account", role: ROLE_USER } - { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS } - { path: "%sylius.security.new_api_admin_route%/authentication-token", role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: "%sylius.security.new_api_user_account_regex%/.*", role: ROLE_USER } - { path: "%sylius.security.new_api_shop_route%/authentication-token", role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: "%sylius.security.new_api_shop_regex%/.*", role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/, role: PUBLIC_ACCESS }
Setup Sylius
bin/console sylius:install:setup