diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d2a12633..d74124cd 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -20,15 +20,12 @@ jobs:
strategy:
fail-fast: false
matrix:
- php: ["8.0"]
+ php: ["8.1"]
symfony: ["^5.4", "^6.0"]
- sylius: ["~1.11.0", "~1.12.0"]
+ sylius: ["~1.12.0"]
node: ["^14.17.x"]
mysql: ["8.0"]
- exclude:
- - sylius: ~1.11.0
- symfony: "^6.0"
env:
APP_ENV: test
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
@@ -136,6 +133,7 @@ jobs:
run: (cd tests/Application && bin/console cache:warmup -vvv)
- name: Load fixtures in test application
+ if: matrix.sylius != '~1.11.0'
run: (cd tests/Application && bin/console sylius:fixtures:load -n)
- name: Validate composer.json
diff --git a/composer.json b/composer.json
index d0979acf..957d0cdf 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,7 @@
"license": "MIT",
"require": {
"php": "^8.0",
- "sylius/sylius": "~1.11.0 || ~1.12.0",
+ "sylius/sylius": "~1.12.0",
"symfony/webpack-encore-bundle": "^1.15",
"dompdf/dompdf": "^2.0"
},
@@ -35,15 +35,7 @@
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"symfony/dependency-injection": "^5.4 || ^6.0",
"league/flysystem-bundle": "2.4.0",
- "sylius/mailer-bundle": "^1.8 || ^2.0@beta"
- },
- "conflict": {
- "doctrine/orm": ">=2.15.2",
- "symfony/symfony": "4.1.8",
- "symfony/browser-kit": "4.1.8",
- "symfony/dom-crawler": "4.1.8",
- "symfony/routing": "4.1.8",
- "symfony/doctrine-bridge": "4.4.16"
+ "sylius/mailer-bundle": "^1.8 || ^2.0"
},
"prefer-stable": true,
"autoload": {
diff --git a/doc/01-installation.md b/doc/01-installation.md
index 382c5204..8e0b208a 100644
--- a/doc/01-installation.md
+++ b/doc/01-installation.md
@@ -9,7 +9,7 @@
1. *We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.*
```bash
-$ composer require bitbag/wishlist-plugin
+composer require bitbag/wishlist-plugin
```
2. Add plugin dependencies to your `config/bundles.php` file:
@@ -45,7 +45,7 @@ bitbag_sylius_wishlist_plugin:
5. Clear application cache by using command:
```bash
-$ bin/console cache:clear
+bin/console cache:clear
```
6. Update your database
@@ -53,14 +53,14 @@ $ bin/console cache:clear
First, please run legacy-versioned migrations by using command:
```bash
-$ bin/console doctrine:migrations:migrate
+bin/console doctrine:migrations:migrate
```
After migration, please create a new diff migration and run it:
```bash
-$ bin/console doctrine:migrations:diff
-$ bin/console doctrine:migrations:migrate
+bin/console doctrine:migrations:diff
+bin/console doctrine:migrations:migrate
```
**Note:** If you are running it on production, add the `-e prod` flag to this command.
@@ -68,14 +68,14 @@ $ bin/console doctrine:migrations:migrate
**Note:** If you are updating this plugin from version 1.4.x you need to run:
```bash
-$ bin/console doctrine:migrations:version BitBag\\SyliusWishlistPlugin\\Migrations\\Version20201029161558 --add --no-interaction
+bin/console doctrine:migrations:version BitBag\\SyliusWishlistPlugin\\Migrations\\Version20201029161558 --add --no-interaction
```
7. Please add plugin templates into your project:
```bash
-$ cp -R vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/Product templates/bundles/SyliusShopBundle
-$ cp vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/_header.html.twig templates/bundles/SyliusShopBundle
-$ cp vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/_logo.html.twig templates/bundles/SyliusShopBundle
+cp -R vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/Product templates/bundles/SyliusShopBundle
+cp vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/_header.html.twig templates/bundles/SyliusShopBundle
+cp vendor/bitbag/wishlist-plugin/tests/Application/templates/bundles/SyliusShopBundle/_logo.html.twig templates/bundles/SyliusShopBundle
```
8. Add plugin assets to your project
diff --git a/doc/01.5-non-webpack.md b/doc/01.5-non-webpack.md
index aa515f00..ebef2dc6 100644
--- a/doc/01.5-non-webpack.md
+++ b/doc/01.5-non-webpack.md
@@ -13,7 +13,7 @@
1. Install plugin assets using:
```bash
-$ bin/console assets:install
+bin/console assets:install
```
2. Add twig inclusions in your templates:
diff --git a/doc/03-customization.md b/doc/03-customization.md
index ad7ea338..e78d6439 100644
--- a/doc/03-customization.md
+++ b/doc/03-customization.md
@@ -9,11 +9,11 @@
Run the below command to see what Symfony services are shared with this plugin:
```bash
-$ bin/console debug:container | grep bitbag_sylius_wishlist_plugin
+bin/console debug:container | grep bitbag_sylius_wishlist_plugin
```
### List of parameters you can override in your parameters.yml(.dist) file
```bash
-$ bin/console debug:container --parameters | grep bitbag
-$ bin/console debug:container --parameters | grep wishlist
+bin/console debug:container --parameters | grep bitbag
+bin/console debug:container --parameters | grep wishlist
```
\ No newline at end of file
diff --git a/doc/04-development.md b/doc/04-development.md
index 8a83b71c..8f38b874 100644
--- a/doc/04-development.md
+++ b/doc/04-development.md
@@ -15,30 +15,30 @@
Clone this repository, go to the plugin root directory and run
```bash
-$ composer install
-$ cd tests/Application
+composer install
+cd tests/Application
```
If needed, create `.env.local` file with the correct configuration for your environment in the `tests/Application` directory.
Then run the following commands from `tests/Application`:
```bash
-$ bin/console doctrine:database:create
-$ bin/console doctrine:schema:create
-$ bin/console sylius:fixtures:load
-$ bin/console assets:install --symlink
+bin/console doctrine:database:create
+bin/console doctrine:schema:create
+bin/console sylius:fixtures:load
+bin/console assets:install --symlink
```
Copy `package.json.~1.xx.dist` file to `package.json` for specific version of Sylius (example for 1.12.0):
```bash
-$ cp package.json.\~1.12.dist package.json
+cp package.json.\~1.12.dist package.json
```
Then:
```bash
-$ yarn install
-$ yarn dev
+yarn install
+yarn dev
```
You're ready to start coding 🎉
@@ -48,7 +48,7 @@ You're ready to start coding 🎉
To start the development server, from the `tests/Application` directory run:
```bash
-$ symfony server:start
+symfony server:start
```
and then you should get information about the server address and port (usually http://localhost:8000).
@@ -60,7 +60,7 @@ If you don't already have Symfony CLI, here's how to install it: https://symfony
To start working on frontend, from the `tests/Application` directory run:
```bash
-$ yarn watch
+yarn watch
```
It's an infinite process, which will watch your changes in the assets folder and (re)build them. So all of your frontend changes should be done in `{root}/src/Resources/assets` directory. We have configured two independent entry points that should not be combined - `shop` for the storefront and `admin` for the admin panel.
diff --git a/doc/05-testing.md b/doc/05-testing.md
index cb22c7ad..e5c4106a 100644
--- a/doc/05-testing.md
+++ b/doc/05-testing.md
@@ -5,25 +5,25 @@
## Testing
```bash
-$ composer install
-$ cd tests/Application
+composer install
+cd tests/Application
```
Copy `package.json.~1.xx.dist` file to `package.json` for specific version of Sylius (example for 1.12.0):
```bash
-$ cp package.json.\~1.12.dist package.json
+cp package.json.\~1.12.dist package.json
```
Then:
```bash
-$ yarn install
-$ yarn dev
-$ APP_ENV=test bin/console assets:install public
-$ APP_ENV=test bin/console doctrine:schema:create
-$ cd ../..
-$ APP_ENV=test symfony server:start --port=8080 --dir=tests/Application/public --daemon
-$ open https://localhost:8080
-$ vendor/bin/behat
-$ vendor/bin/phpspec run
+yarn install
+yarn dev
+APP_ENV=test bin/console assets:install public
+APP_ENV=test bin/console doctrine:schema:create
+cd ../..
+APP_ENV=test symfony server:start --port=8080 --dir=tests/Application/public --daemon
+open https://localhost:8080
+vendor/bin/behat
+vendor/bin/phpspec run
```
\ No newline at end of file
diff --git a/tests/Application/config/bundles.php b/tests/Application/config/bundles.php
index c1cc24e5..e141303f 100755
--- a/tests/Application/config/bundles.php
+++ b/tests/Application/config/bundles.php
@@ -58,4 +58,6 @@
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
+ BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true],
+ SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
];
diff --git a/tests/Application/config/packages/security.yaml b/tests/Application/config/packages/security.yaml
index 4ed342f8..10628102 100644
--- a/tests/Application/config/packages/security.yaml
+++ b/tests/Application/config/packages/security.yaml
@@ -1,5 +1,16 @@
+parameters:
+ sylius.security.admin_regex: "^/%sylius_admin.path_name%"
+ sylius.security.api_regex: "^/api"
+ sylius.security.shop_regex: "^/(?!%sylius_admin.path_name%|new-api|api/.*|api$|media/.*)[^/]++"
+ sylius.security.new_api_route: "/new-api"
+ sylius.security.new_api_regex: "^%sylius.security.new_api_route%"
+ sylius.security.new_api_admin_route: "%sylius.security.new_api_route%/admin"
+ sylius.security.new_api_admin_regex: "^%sylius.security.new_api_admin_route%"
+ sylius.security.new_api_shop_route: "%sylius.security.new_api_route%/shop"
+ sylius.security.new_api_shop_regex: "^%sylius.security.new_api_shop_route%"
+
security:
- enable_authenticator_manager: true
+ always_authenticate_before_granting: true
providers:
sylius_admin_user_provider:
id: sylius.admin_user_provider.email_or_name_based
@@ -9,8 +20,11 @@ security:
id: sylius.shop_user_provider.email_or_name_based
sylius_api_shop_user_provider:
id: sylius.shop_user_provider.email_or_name_based
+ sylius_api_chain_provider:
+ chain:
+ providers: [sylius_api_shop_user_provider, sylius_api_admin_user_provider]
- password_hashers:
+ encoders:
Sylius\Component\User\Model\UserInterface: argon2i
firewalls:
admin:
@@ -26,7 +40,7 @@ security:
default_target_path: sylius_admin_dashboard
use_forward: false
use_referer: true
- enable_csrf: true
+ csrf_token_generator: security.csrf.token_manager
csrf_parameter: _csrf_admin_security_token
csrf_token_id: admin_authenticate
remember_me:
@@ -38,32 +52,46 @@ security:
logout:
path: sylius_admin_logout
target: sylius_admin_login
+ anonymous: true
new_api_admin_user:
- pattern: "%sylius.security.new_api_admin_regex%/.*"
- provider: sylius_api_admin_user_provider
+ pattern: "%sylius.security.new_api_route%/admin-user-authentication-token"
+ provider: sylius_admin_user_provider
stateless: true
- entry_point: jwt
+ anonymous: true
json_login:
- check_path: "%sylius.security.new_api_admin_route%/authentication-token"
+ check_path: "%sylius.security.new_api_route%/admin-user-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
+ 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
+ pattern: "%sylius.security.new_api_route%/shop-user-authentication-token"
+ provider: sylius_shop_user_provider
stateless: true
- entry_point: jwt
+ anonymous: true
json_login:
- check_path: "%sylius.security.new_api_shop_route%/authentication-token"
+ check_path: "%sylius.security.new_api_route%/shop-user-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
+ guard:
+ authenticators:
+ - lexik_jwt_authentication.jwt_token_authenticator
+
+ new_api:
+ pattern: "%sylius.security.new_api_regex%/*"
+ provider: sylius_api_chain_provider
+ stateless: true
+ anonymous: lazy
+ guard:
+ authenticators:
+ - lexik_jwt_authentication.jwt_token_authenticator
shop:
switch_user: { role: ROLE_ALLOWED_TO_SWITCH }
@@ -80,7 +108,7 @@ security:
default_target_path: sylius_shop_homepage
use_forward: false
use_referer: true
- enable_csrf: true
+ csrf_token_generator: security.csrf.token_manager
csrf_parameter: _csrf_shop_security_token
csrf_token_id: shop_authenticate
remember_me:
@@ -90,35 +118,31 @@ security:
remember_me_parameter: _remember_me
logout:
path: sylius_shop_logout
- target: sylius_shop_homepage
+ target: sylius_shop_login
invalidate_session: false
+ success_handler: sylius.handler.shop_user_logout
+ anonymous: true
dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
- security: false
-
- image_resolver:
- pattern: ^/media/cache/resolve
+ pattern: ^/(_(profiler|wdt)|css|images|js)/
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: IS_AUTHENTICATED_ANONYMOUSLY, 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: IS_AUTHENTICATED_ANONYMOUSLY, 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.admin_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
+ - { path: "%sylius.security.api_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
+ - { path: "%sylius.security.shop_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: "%sylius.security.shop_regex%/register", role: PUBLIC_ACCESS }
- - { path: "%sylius.security.shop_regex%/verify", role: PUBLIC_ACCESS }
+ - { path: "%sylius.security.shop_regex%/register", role: IS_AUTHENTICATED_ANONYMOUSLY }
+ - { path: "%sylius.security.shop_regex%/verify", role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS }
+ - { path: "%sylius.security.api_regex%/.*", role: ROLE_API_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 }
+ - { path: "%sylius.security.new_api_shop_regex%/.*", role: IS_AUTHENTICATED_ANONYMOUSLY }
diff --git a/tests/Application/config/sylius/1.11/bundles.php b/tests/Application/config/sylius/1.11/bundles.php
deleted file mode 100644
index 7109dc23..00000000
--- a/tests/Application/config/sylius/1.11/bundles.php
+++ /dev/null
@@ -1,7 +0,0 @@
- ['all' => true],
- SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
- Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
-];
diff --git a/tests/Application/config/sylius/1.11/packages/jms_serializer.yaml b/tests/Application/config/sylius/1.11/packages/jms_serializer.yaml
deleted file mode 100644
index ed7bc613..00000000
--- a/tests/Application/config/sylius/1.11/packages/jms_serializer.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-jms_serializer:
- visitors:
- xml_serialization:
- format_output: '%kernel.debug%'
diff --git a/tests/Application/config/sylius/1.11/packages/security.yaml b/tests/Application/config/sylius/1.11/packages/security.yaml
deleted file mode 100644
index 10628102..00000000
--- a/tests/Application/config/sylius/1.11/packages/security.yaml
+++ /dev/null
@@ -1,148 +0,0 @@
-parameters:
- sylius.security.admin_regex: "^/%sylius_admin.path_name%"
- sylius.security.api_regex: "^/api"
- sylius.security.shop_regex: "^/(?!%sylius_admin.path_name%|new-api|api/.*|api$|media/.*)[^/]++"
- sylius.security.new_api_route: "/new-api"
- sylius.security.new_api_regex: "^%sylius.security.new_api_route%"
- sylius.security.new_api_admin_route: "%sylius.security.new_api_route%/admin"
- sylius.security.new_api_admin_regex: "^%sylius.security.new_api_admin_route%"
- sylius.security.new_api_shop_route: "%sylius.security.new_api_route%/shop"
- sylius.security.new_api_shop_regex: "^%sylius.security.new_api_shop_route%"
-
-security:
- always_authenticate_before_granting: 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
- sylius_api_chain_provider:
- chain:
- providers: [sylius_api_shop_user_provider, sylius_api_admin_user_provider]
-
- encoders:
- 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
- csrf_token_generator: security.csrf.token_manager
- 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
- anonymous: true
-
- new_api_admin_user:
- pattern: "%sylius.security.new_api_route%/admin-user-authentication-token"
- provider: sylius_admin_user_provider
- stateless: true
- anonymous: true
- json_login:
- check_path: "%sylius.security.new_api_route%/admin-user-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_route%/shop-user-authentication-token"
- provider: sylius_shop_user_provider
- stateless: true
- anonymous: true
- json_login:
- check_path: "%sylius.security.new_api_route%/shop-user-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:
- pattern: "%sylius.security.new_api_regex%/*"
- provider: sylius_api_chain_provider
- stateless: true
- anonymous: lazy
- 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
- csrf_token_generator: security.csrf.token_manager
- 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_login
- invalidate_session: false
- success_handler: sylius.handler.shop_user_logout
- anonymous: true
-
- dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
- security: false
-
- access_control:
- - { path: "%sylius.security.admin_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
- - { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_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.admin_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: "%sylius.security.api_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { 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.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS }
- - { path: "%sylius.security.api_regex%/.*", role: ROLE_API_ACCESS }
- - { 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_shop_regex%/.*", role: IS_AUTHENTICATED_ANONYMOUSLY }
diff --git a/tests/Application/config/sylius/1.11/packages/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/swiftmailer.yaml
deleted file mode 100644
index 73bba275..00000000
--- a/tests/Application/config/sylius/1.11/packages/swiftmailer.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-swiftmailer:
- url: '%env(MAILER_URL)%'
diff --git a/tests/Application/config/sylius/1.11/packages/test/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/test/swiftmailer.yaml
deleted file mode 100644
index cf16fdfe..00000000
--- a/tests/Application/config/sylius/1.11/packages/test/swiftmailer.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-swiftmailer:
- disable_delivery: true
- logging: true
- spool:
- type: file
- path: "%kernel.cache_dir%/spool"
\ No newline at end of file
diff --git a/tests/Application/config/sylius/1.11/packages/test_cached/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/test_cached/swiftmailer.yaml
deleted file mode 100644
index cf16fdfe..00000000
--- a/tests/Application/config/sylius/1.11/packages/test_cached/swiftmailer.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-swiftmailer:
- disable_delivery: true
- logging: true
- spool:
- type: file
- path: "%kernel.cache_dir%/spool"
\ No newline at end of file
diff --git a/tests/Application/config/sylius/1.12/bundles.php b/tests/Application/config/sylius/1.12/bundles.php
deleted file mode 100644
index bd33f4ae..00000000
--- a/tests/Application/config/sylius/1.12/bundles.php
+++ /dev/null
@@ -1,6 +0,0 @@
- ['all' => true],
- SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
-];
diff --git a/tests/Application/config/sylius/1.12/packages/jms_serializer.yaml b/tests/Application/config/sylius/1.12/packages/jms_serializer.yaml
deleted file mode 100644
index ed7bc613..00000000
--- a/tests/Application/config/sylius/1.12/packages/jms_serializer.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-jms_serializer:
- visitors:
- xml_serialization:
- format_output: '%kernel.debug%'
diff --git a/tests/Application/config/sylius/1.12/packages/security.yaml b/tests/Application/config/sylius/1.12/packages/security.yaml
deleted file mode 100644
index 10628102..00000000
--- a/tests/Application/config/sylius/1.12/packages/security.yaml
+++ /dev/null
@@ -1,148 +0,0 @@
-parameters:
- sylius.security.admin_regex: "^/%sylius_admin.path_name%"
- sylius.security.api_regex: "^/api"
- sylius.security.shop_regex: "^/(?!%sylius_admin.path_name%|new-api|api/.*|api$|media/.*)[^/]++"
- sylius.security.new_api_route: "/new-api"
- sylius.security.new_api_regex: "^%sylius.security.new_api_route%"
- sylius.security.new_api_admin_route: "%sylius.security.new_api_route%/admin"
- sylius.security.new_api_admin_regex: "^%sylius.security.new_api_admin_route%"
- sylius.security.new_api_shop_route: "%sylius.security.new_api_route%/shop"
- sylius.security.new_api_shop_regex: "^%sylius.security.new_api_shop_route%"
-
-security:
- always_authenticate_before_granting: 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
- sylius_api_chain_provider:
- chain:
- providers: [sylius_api_shop_user_provider, sylius_api_admin_user_provider]
-
- encoders:
- 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
- csrf_token_generator: security.csrf.token_manager
- 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
- anonymous: true
-
- new_api_admin_user:
- pattern: "%sylius.security.new_api_route%/admin-user-authentication-token"
- provider: sylius_admin_user_provider
- stateless: true
- anonymous: true
- json_login:
- check_path: "%sylius.security.new_api_route%/admin-user-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_route%/shop-user-authentication-token"
- provider: sylius_shop_user_provider
- stateless: true
- anonymous: true
- json_login:
- check_path: "%sylius.security.new_api_route%/shop-user-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:
- pattern: "%sylius.security.new_api_regex%/*"
- provider: sylius_api_chain_provider
- stateless: true
- anonymous: lazy
- 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
- csrf_token_generator: security.csrf.token_manager
- 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_login
- invalidate_session: false
- success_handler: sylius.handler.shop_user_logout
- anonymous: true
-
- dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
- security: false
-
- access_control:
- - { path: "%sylius.security.admin_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
- - { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_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.admin_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: "%sylius.security.api_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { 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.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS }
- - { path: "%sylius.security.api_regex%/.*", role: ROLE_API_ACCESS }
- - { 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_shop_regex%/.*", role: IS_AUTHENTICATED_ANONYMOUSLY }
diff --git a/tests/Application/package.json.~1.12.0.dist b/tests/Application/package.json
similarity index 100%
rename from tests/Application/package.json.~1.12.0.dist
rename to tests/Application/package.json
diff --git a/tests/Application/package.json.~1.11.0.dist b/tests/Application/package.json.~1.11.0.dist
deleted file mode 100755
index 9ca35627..00000000
--- a/tests/Application/package.json.~1.11.0.dist
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "dependencies": {
- "@babel/polyfill": "^7.0.0",
- "chart.js": "^2.9.3",
- "jquery": "^3.5.0",
- "jquery.dirtyforms": "^2.0.0",
- "lightbox2": "^2.9.0",
- "semantic-ui-css": "^2.2.0",
- "slick-carousel": "^1.8.1"
- },
- "devDependencies": {
- "@symfony/webpack-encore": "^1.6.1",
- "babel-core": "^6.26.3",
- "babel-plugin-external-helpers": "^6.22.0",
- "babel-plugin-module-resolver": "^3.1.1",
- "babel-plugin-transform-object-rest-spread": "^6.26.0",
- "babel-preset-env": "^1.7.0",
- "babel-register": "^6.26.0",
- "dedent": "^0.7.0",
- "eslint": "^4.19.1",
- "eslint-config-airbnb-base": "^12.1.0",
- "eslint-import-resolver-babel-module": "^4.0.0",
- "eslint-plugin-import": "^2.11.0",
- "merge-stream": "^1.0.0",
- "sass": "^1.39.2",
- "sass-loader": "^12.1.0"
- },
- "scripts": {
- "dev": "yarn encore dev",
- "watch": "yarn encore dev --watch",
- "prod": "yarn encore prod",
- "lint": "yarn lint:js",
- "lint:js": "eslint gulpfile.babel.js"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/Sylius/Sylius.git"
- },
- "author": "Paweł Jędrzejewski",
- "license": "MIT"
-}