Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflect Sylius Codebase Changes #1036

Merged
merged 5 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN=doctrine://default
SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=doctrine://default?queue_name=main_failed
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=doctrine://default?queue_name=catalog_promotion_removal
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN=doctrine://default?queue_name=catalog_promotion_removal_failed
SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_DSN=doctrine://default?queue_name=payment_request
SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_FAILED_DSN=doctrine://default?queue_name=payment_request_failed
###< symfony/messenger ###

###> lexik/jwt-authentication-bundle ###
Expand Down
2 changes: 2 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_FAILED_DSN=sync://
###< symfony/messenger ###
2 changes: 2 additions & 0 deletions .env.test_cached
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_DSN=sync://
SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_FAILED_DSN=sync://
###< symfony/messenger ###
2 changes: 1 addition & 1 deletion config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
Sylius\Bundle\CoreBundle\SyliusCoreBundle::class => ['all' => true],
Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true],
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class => ['all' => true],
Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true],
Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true],
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
Expand Down Expand Up @@ -60,4 +59,5 @@
Symfony\UX\LiveComponent\LiveComponentBundle::class => ['all' => true],
Symfony\UX\Autocomplete\AutocompleteBundle::class => ['all' => true],
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
Sylius\TwigExtra\Symfony\SyliusTwigExtraBundle::class => ['all' => true],
];
8 changes: 4 additions & 4 deletions config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ imports:
- { resource: "@SyliusAdminBundle/Resources/config/app/config.yml" }
- { resource: "@SyliusApiBundle/Resources/config/app/config.yaml" }
- { resource: "@SyliusShopBundle/Resources/config/app/config.yml" }
- { resource: "@SyliusPayumBundle/Resources/config/app/config.yaml" }

- { resource: "../parameters.yaml" }

Expand Down Expand Up @@ -123,16 +124,15 @@ sylius_payment:
payment:
classes:
model: App\Entity\Payment\Payment
gateway_config:
classes:
model: App\Entity\Payment\GatewayConfig

sylius_payum:
resources:
payment_security_token:
classes:
model: App\Entity\Payment\PaymentSecurityToken
gateway_config:
classes:
model: App\Entity\Payment\GatewayConfig

sylius_product:
resources:
product:
Expand Down
28 changes: 16 additions & 12 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ security:
context: admin
pattern: "%sylius.security.admin_regex%"
provider: sylius_admin_user_provider
user_checker: security.user_checker.chain.admin
form_login:
provider: sylius_admin_user_provider
login_path: sylius_admin_login
Expand All @@ -38,26 +39,28 @@ security:
path: sylius_admin_logout
target: sylius_admin_login

new_api_admin_user:
pattern: "%sylius.security.new_api_admin_regex%/.*"
api_admin:
pattern: "%sylius.security.api_admin_regex%/.*"
provider: sylius_api_admin_user_provider
user_checker: security.user_checker.chain.api_admin
stateless: true
entry_point: jwt
json_login:
check_path: "%sylius.security.new_api_admin_route%/administrators/token"
check_path: "%sylius.security.api_admin_route%/administrators/token"
username_path: email
password_path: password
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure
jwt: true

new_api_shop_user:
pattern: "%sylius.security.new_api_shop_regex%/.*"
api_shop:
pattern: "%sylius.security.api_shop_regex%/.*"
provider: sylius_api_shop_user_provider
user_checker: security.user_checker.chain.api_shop
stateless: true
entry_point: jwt
json_login:
check_path: "%sylius.security.new_api_shop_route%/customers/token"
check_path: "%sylius.security.api_shop_route%/customers/token"
username_path: email
password_path: password
success_handler: lexik_jwt_authentication.handler.authentication_success
Expand All @@ -69,6 +72,7 @@ security:
context: shop
pattern: "%sylius.security.shop_regex%"
provider: sylius_shop_user_provider
user_checker: security.user_checker.chain.shop
form_login:
success_handler: sylius.authentication.success_handler
failure_handler: sylius.authentication.failure_handler
Expand Down Expand Up @@ -118,9 +122,9 @@ security:
- { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS }
- { path: "%sylius.security.shop_regex%/account", role: ROLE_USER }

- { path: "%sylius.security.new_api_admin_route%/administrators/reset-password", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS }
- { path: "%sylius.security.new_api_admin_route%/administrators/token", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_user_account_regex%/.*", role: ROLE_USER }
- { path: "%sylius.security.new_api_shop_route%/customers/token", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_shop_regex%/.*", role: PUBLIC_ACCESS }
- { path: "%sylius.security.api_admin_route%/administrators/reset-password", role: PUBLIC_ACCESS }
- { path: "%sylius.security.api_admin_regex%/.*", role: ROLE_API_ACCESS }
- { path: "%sylius.security.api_admin_route%/administrators/token", role: PUBLIC_ACCESS }
- { path: "%sylius.security.api_shop_account_regex%/.*", role: ROLE_USER }
- { path: "%sylius.security.api_shop_route%/customers/token", role: PUBLIC_ACCESS }
- { path: "%sylius.security.api_shop_regex%/.*", role: PUBLIC_ACCESS }
2 changes: 1 addition & 1 deletion config/routes/sylius_api.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sylius_api:
resource: "@SyliusApiBundle/Resources/config/routing.yml"
prefix: "%sylius.security.new_api_route%"
prefix: "%sylius.security.api_route%"
5 changes: 4 additions & 1 deletion config/routes/sylius_shop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ sylius_shop:
_locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$

sylius_shop_payum:
resource: "@SyliusShopBundle/Resources/config/routing/payum.yml"
resource: "@SyliusPayumBundle/Resources/config/routing/integrations/sylius_shop.yaml"

sylius_payment_notify:
resource: "@SyliusPaymentBundle/Resources/config/routing/integrations/sylius.yaml"

sylius_shop_default_locale:
path: /
Expand Down
21 changes: 18 additions & 3 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,15 @@
"sylius/theme-bundle": {
"version": "v2.4.0"
},
"sylius/twig-extra": {
"version": "0.4",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "main",
"version": "0.4",
"ref": "00e1c7f2e97de7b0d990e507e1541fd05d4cdbfe"
}
},
"sylius/twig-hooks": {
"version": "v0.3.0"
},
Expand Down Expand Up @@ -442,6 +451,15 @@
"templates/base.html.twig"
]
},
"symfony/uid": {
"version": "7.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "7.0",
"ref": "0df5844274d871b37fc3816c57a768ffc60a43a5"
}
},
"symfony/ux-autocomplete": {
"version": "2.20",
"recipe": {
Expand Down Expand Up @@ -542,8 +560,5 @@
},
"twig/extra-bundle": {
"version": "v3.13.0"
},
"winzou/state-machine-bundle": {
"version": "v0.6.2"
}
}
Loading