Skip to content

Commit f03dc4b

Browse files
Merge pull request #540 from BitBagCommerce/upgrade-1-14
upgrade to 1.14
2 parents b26009d + 3da875f commit f03dc4b

6 files changed

Lines changed: 155 additions & 15 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,20 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
php: [ "8.0", "8.1", "8.2", "8.3" ]
23-
symfony: [ "^5.4", "^6.4" ]
24-
sylius: [ "^1.12", "^1.13" ]
25-
node: [ "18.x", "20.x" ]
26-
mysql: [ "8.0" ]
22+
php: ["8.0", "8.1", "8.2", "8.3"]
23+
symfony: ["^5.4", "^6.4"]
24+
sylius: ["~1.12.0", "~1.13.0", "~1.14.0"]
25+
node: ["20.x"]
26+
mysql: ["8.0"]
2727

2828
exclude:
29-
- sylius: ^1.13
29+
- sylius: "~1.13.0"
3030
php: 8.0
31-
- sylius: ^1.12
31+
- sylius: "~1.14.0"
32+
php: 8.0
33+
- sylius: "~1.14.0"
34+
symfony: ^5.4
35+
- sylius: "~1.12.0"
3236
php: 8.0
3337
symfony: ^6.4
3438

@@ -162,4 +166,4 @@ jobs:
162166
SLACK_MESSAGE: ':x:'
163167
SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository
164168
SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }}
165-
SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}
169+
SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}

.github/workflows/coding_standard.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
php: [ "8.0", "8.1", "8.2", "8.3" ]
22-
symfony: [ "^5.4", "^6.4" ]
23-
sylius: [ "^1.12", "^1.13" ]
24-
node: [ "18.x", "20.x" ]
21+
php: ["8.0", "8.1", "8.2", "8.3"]
22+
symfony: ["^5.4", "^6.4"]
23+
sylius: ["~1.12.0", "~1.13.0", "~1.14.0"]
24+
node: ["20.x"]
2525

2626
exclude:
27-
- sylius: ^1.13
27+
- sylius: "~1.13.0"
2828
php: 8.0
29-
- sylius: ^1.12
29+
- sylius: "~1.14.0"
30+
php: 8.0
31+
- sylius: "~1.14.0"
32+
symfony: ^5.4
33+
- sylius: "~1.12.0"
3034
php: 8.0
3135
symfony: ^6.4
3236

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"license": "MIT",
1111
"require": {
1212
"php": "^8.0",
13-
"sylius/sylius": "^1.12.0 || ^1.13.0",
13+
"sylius/sylius": "^1.12",
1414
"league/csv": "^9.1",
1515
"friendsofsymfony/ckeditor-bundle": "^2.0",
1616
"instaclick/php-webdriver": "^1.4",

phpstan.neon.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ parameters:
1515
- identifier: missingType.iterableValue
1616
- identifier: missingType.generics
1717
- '#.*NodeParentInterface.*#'
18+
- '#should return Sylius\\Component\\Resource\\Model\\TranslationInterface but returns Sylius\\Resource\\Model\\TranslationInterface\.#'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
return [
6+
Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class => ['all' => true],
7+
];
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 }

0 commit comments

Comments
 (0)