Skip to content

Commit b8a6bed

Browse files
upgrade to 1.14
1 parent 1debd65 commit b8a6bed

File tree

8 files changed

+164
-7
lines changed

8 files changed

+164
-7
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,21 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
php: ["8.0", "8.1", "8.2", "8.3"]
25-
symfony: ["^5.4", "^6.0"]
26-
sylius: ["~1.12.0", "~1.13.0"]
25+
symfony: ["^5.4", "^6.4"]
26+
sylius: ["~1.12.0", "~1.13.0", "~1.14.0"]
2727
node: ["20.x"]
2828
mysql: ["8.0"]
29+
2930
exclude:
3031
- sylius: "~1.13.0"
31-
php: "8.0"
32+
php: 8.0
33+
- sylius: "~1.14.0"
34+
php: 8.0
35+
- sylius: "~1.14.0"
36+
symfony: ^5.4
37+
- sylius: "~1.12.0"
38+
php: 8.0
39+
symfony: ^6.4
3240

3341
env:
3442
APP_ENV: test

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"description": "Bonus points plugin for Sylius.",
99
"license": "MIT",
1010
"require": {
11-
"php": "^8.0 || ^8.1 || ^8.2 || ^8.3",
12-
"sylius/sylius": "~1.12.0 || ~1.13.0"
11+
"php": "^8.0",
12+
"sylius/sylius": "^1.12"
1313
},
1414
"require-dev": {
1515
"behat/behat": "^3.6.1",
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
/*
4+
* This file has been created by developers from BitBag.
5+
* Feel free to contact us once you face any issues or want to start
6+
* You can find more information about us on https://bitbag.io and write us
7+
* an email on [email protected].
8+
*/
9+
10+
declare(strict_types=1);
11+
12+
return [
13+
Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class => ['all' => true],
14+
];
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
security:
2+
enable_authenticator_manager: true
3+
providers:
4+
sylius_admin_user_provider:
5+
id: sylius.admin_user_provider.email_or_name_based
6+
sylius_api_admin_user_provider:
7+
id: sylius.admin_user_provider.email_or_name_based
8+
sylius_shop_user_provider:
9+
id: sylius.shop_user_provider.email_or_name_based
10+
sylius_api_shop_user_provider:
11+
id: sylius.shop_user_provider.email_or_name_based
12+
13+
password_hashers:
14+
Sylius\Component\User\Model\UserInterface: argon2i
15+
firewalls:
16+
admin:
17+
switch_user: true
18+
context: admin
19+
pattern: "%sylius.security.admin_regex%"
20+
provider: sylius_admin_user_provider
21+
form_login:
22+
provider: sylius_admin_user_provider
23+
login_path: sylius_admin_login
24+
check_path: sylius_admin_login_check
25+
failure_path: sylius_admin_login
26+
default_target_path: sylius_admin_dashboard
27+
use_forward: false
28+
use_referer: true
29+
enable_csrf: true
30+
csrf_parameter: _csrf_admin_security_token
31+
csrf_token_id: admin_authenticate
32+
remember_me:
33+
secret: "%env(APP_SECRET)%"
34+
path: "/%sylius_admin.path_name%"
35+
name: APP_ADMIN_REMEMBER_ME
36+
lifetime: 31536000
37+
remember_me_parameter: _remember_me
38+
logout:
39+
path: sylius_admin_logout
40+
target: sylius_admin_login
41+
42+
new_api_admin_user:
43+
pattern: "%sylius.security.new_api_admin_regex%/.*"
44+
provider: sylius_api_admin_user_provider
45+
stateless: true
46+
entry_point: jwt
47+
json_login:
48+
check_path: "%sylius.security.new_api_admin_route%/administrators/token"
49+
username_path: email
50+
password_path: password
51+
success_handler: lexik_jwt_authentication.handler.authentication_success
52+
failure_handler: lexik_jwt_authentication.handler.authentication_failure
53+
jwt: true
54+
55+
new_api_shop_user:
56+
pattern: "%sylius.security.new_api_shop_regex%/.*"
57+
provider: sylius_api_shop_user_provider
58+
stateless: true
59+
entry_point: jwt
60+
json_login:
61+
check_path: "%sylius.security.new_api_shop_route%/customers/token"
62+
username_path: email
63+
password_path: password
64+
success_handler: lexik_jwt_authentication.handler.authentication_success
65+
failure_handler: lexik_jwt_authentication.handler.authentication_failure
66+
jwt: true
67+
68+
shop:
69+
switch_user: { role: ROLE_ALLOWED_TO_SWITCH }
70+
context: shop
71+
pattern: "%sylius.security.shop_regex%"
72+
provider: sylius_shop_user_provider
73+
form_login:
74+
success_handler: sylius.authentication.success_handler
75+
failure_handler: sylius.authentication.failure_handler
76+
provider: sylius_shop_user_provider
77+
login_path: sylius_shop_login
78+
check_path: sylius_shop_login_check
79+
failure_path: sylius_shop_login
80+
default_target_path: sylius_shop_homepage
81+
use_forward: false
82+
use_referer: true
83+
enable_csrf: true
84+
csrf_parameter: _csrf_shop_security_token
85+
csrf_token_id: shop_authenticate
86+
remember_me:
87+
secret: "%env(APP_SECRET)%"
88+
name: APP_SHOP_REMEMBER_ME
89+
lifetime: 31536000
90+
remember_me_parameter: _remember_me
91+
logout:
92+
path: sylius_shop_logout
93+
target: sylius_shop_homepage
94+
invalidate_session: false
95+
96+
dev:
97+
pattern: ^/(_(profiler|wdt)|css|images|js)/
98+
security: false
99+
100+
image_resolver:
101+
pattern: ^/media/cache/resolve
102+
security: false
103+
104+
access_control:
105+
- { path: "%sylius.security.admin_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] }
106+
- { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS }
107+
- { path: "%sylius.security.shop_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] }
108+
- { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS }
109+
110+
- { path: "%sylius.security.admin_regex%/login", role: PUBLIC_ACCESS }
111+
- { path: "%sylius.security.shop_regex%/login", role: PUBLIC_ACCESS }
112+
113+
- { path: "%sylius.security.shop_regex%/register", role: PUBLIC_ACCESS }
114+
- { path: "%sylius.security.shop_regex%/verify", role: PUBLIC_ACCESS }
115+
116+
- { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS }
117+
- { path: "%sylius.security.shop_regex%/account", role: ROLE_USER }
118+
119+
- { path: "%sylius.security.new_api_admin_route%/administrators/reset-password", role: PUBLIC_ACCESS }
120+
- { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS }
121+
- { path: "%sylius.security.new_api_admin_route%/administrators/token", role: PUBLIC_ACCESS }
122+
- { path: "%sylius.security.new_api_user_account_regex%/.*", role: ROLE_USER }
123+
- { path: "%sylius.security.new_api_shop_route%/customers/token", role: PUBLIC_ACCESS }
124+
- { path: "%sylius.security.new_api_shop_regex%/.*", role: PUBLIC_ACCESS }
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
framework:
2+
mailer:
3+
dsn: 'null://null'
4+
cache:
5+
pools:
6+
test.mailer_pool:
7+
adapter: cache.adapter.filesystem
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
security:
2+
password_hashers:
3+
sha512: sha512
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
security:
2+
encoders:
3+
sha512: sha512

tests/Application/config/symfony/4.4/packages/framework.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)