Skip to content

Commit

Permalink
upgrade to 1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherhero committed Dec 7, 2024
1 parent 51740d3 commit 470e245
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 12 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,22 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.0", "8.1", "8.2"]
symfony: ["^5.4", "^6.0"]
sylius: ["~1.12.0", "~1.13.0"]
node: ["14.x"]
mysql: ["5.7", "8.0"]
php: ["8.0", "8.1", "8.2", "8.3"]
symfony: ["^5.4", "^6.4"]
sylius: ["~1.12.0", "~1.13.0", "~1.14.0"]
node: ["20.x"]
mysql: ["8.0"]

exclude:
- sylius: "~1.13.0"
php: "8.0"
- sylius: "~1.13.0"
php: 8.0
- sylius: "~1.14.0"
php: 8.0
- sylius: "~1.14.0"
symfony: ^5.4
- sylius: "~1.12.0"
php: 8.0
symfony: ^6.4

env:
APP_ENV: test
Expand Down Expand Up @@ -180,7 +187,7 @@ jobs:
name: Behat logs
path: etc/build/
if-no-files-found: ignore

-
name: Failed build Slack notification
uses: rtCamp/action-slack-notify@v2
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"php": "^8.0",
"sylius/sylius": "~1.12.0 || ~1.13.0"
"sylius/sylius": "^1.12"
},
"require-dev": {
"behat/behat": "^3.7",
Expand Down
19 changes: 19 additions & 0 deletions tests/Application/config/sylius/1.14/bundles.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

/*
* This file has been created by developers from BitBag.
* Feel free to contact us once you face any issues or want to start
* You can find more information about us on https://bitbag.io and write us
* an email on [email protected].
*/

declare(strict_types=1);

return [
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true],
SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class => ['all' => true],
];
3 changes: 3 additions & 0 deletions tests/Application/config/sylius/1.14/packages/mailer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
framework:
mailer:
dsn: '%env(MAILER_DSN)%'
124 changes: 124 additions & 0 deletions tests/Application/config/sylius/1.14/packages/security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
security:
enable_authenticator_manager: true
providers:
sylius_admin_user_provider:
id: sylius.admin_user_provider.email_or_name_based
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

password_hashers:
Sylius\Component\User\Model\UserInterface: argon2i
firewalls:
admin:
switch_user: true
context: admin
pattern: "%sylius.security.admin_regex%"
provider: sylius_admin_user_provider
form_login:
provider: sylius_admin_user_provider
login_path: sylius_admin_login
check_path: sylius_admin_login_check
failure_path: sylius_admin_login
default_target_path: sylius_admin_dashboard
use_forward: false
use_referer: true
enable_csrf: true
csrf_parameter: _csrf_admin_security_token
csrf_token_id: admin_authenticate
remember_me:
secret: "%env(APP_SECRET)%"
path: "/%sylius_admin.path_name%"
name: APP_ADMIN_REMEMBER_ME
lifetime: 31536000
remember_me_parameter: _remember_me
logout:
path: sylius_admin_logout
target: sylius_admin_login

new_api_admin_user:
pattern: "%sylius.security.new_api_admin_regex%/.*"
provider: sylius_api_admin_user_provider
stateless: true
entry_point: jwt
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
jwt: true

new_api_shop_user:
pattern: "%sylius.security.new_api_shop_regex%/.*"
provider: sylius_api_shop_user_provider
stateless: true
entry_point: jwt
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
jwt: true

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
enable_csrf: true
csrf_parameter: _csrf_shop_security_token
csrf_token_id: shop_authenticate
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_homepage
invalidate_session: false

dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false

image_resolver:
pattern: ^/media/cache/resolve
security: false

access_control:
- { path: "%sylius.security.admin_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] }
- { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS }
- { path: "%sylius.security.shop_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] }
- { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS }

- { path: "%sylius.security.admin_regex%/login", role: PUBLIC_ACCESS }
- { path: "%sylius.security.shop_regex%/login", role: PUBLIC_ACCESS }

- { path: "%sylius.security.shop_regex%/register", role: PUBLIC_ACCESS }
- { path: "%sylius.security.shop_regex%/verify", role: PUBLIC_ACCESS }

- { 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%/reset-password-requests", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS }
- { path: "%sylius.security.new_api_admin_route%/authentication-token", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_user_account_regex%/.*", role: ROLE_USER }
- { path: "%sylius.security.new_api_shop_route%/authentication-token", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_shop_regex%/.*", role: PUBLIC_ACCESS }
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
framework:
mailer:
dsn: 'null://null'
cache:
pools:
test.mailer_pool:
adapter: cache.adapter.filesystem
2 changes: 0 additions & 2 deletions tests/Application/config/symfony/4.4/packages/framework.yaml

This file was deleted.

0 comments on commit 470e245

Please sign in to comment.