minor #14315 [Maintenance] Improve note in UPGRADE file about changes in security.yaml (GSadee)

This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12|
| Bug fix?        | no                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no|
| Related tickets | fixes https://github.com/Sylius/Sylius/pull/14283|
| License         | MIT                                                          |

As it does not look like a diff now:
<img width="1032" alt="image" src="https://user-images.githubusercontent.com/6140884/190562242-90b5d014-bc11-48b2-a6df-9b76fb500e45.png">

<!--
 - Bug fixes must be submitted against the 1.11 branch
 - Features and deprecations must be submitted against the 1.12 branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->


Commits
-------

c57735609c [Maintenance] Improve note in UPGRADE file about changes in security.yaml
This commit is contained in:
Mateusz Zalewski 2022-09-20 10:41:18 +02:00 committed by GitHub
commit b8dd65d686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,39 +40,39 @@ with test or remove these services with complier pass.
8. Due to updating to Symfony 6 security file was changed to use the updated security system so you need to adjust your `config/packages/security.yaml` file:
```diff
```diff
security:
- always_authenticate_before_granting: true
+ enable_authenticator_manager: true
- always_authenticate_before_granting: true
+ enable_authenticator_manager: true
```
and you need to adjust all of your firewalls like that:
```diff
admin:
# ...
form_login:
# ...
- csrf_token_generator: security.csrf.token_manager
+ enable_csrf: true
# ...
new_api_admin_user:
# ...
- anonymous: true
+ entry_point: jwt
# ...
- guard:
# ...
+ jwt: true
admin:
# ...
form_login:
# ...
- csrf_token_generator: security.csrf.token_manager
+ enable_csrf: true
# ...
new_api_admin_user:
# ...
- anonymous: true
+ entry_point: jwt
# ...
- guard:
- authenticators:
- # ...
+ jwt: true
```
and also you need to adjust all of your access_control like that:
```diff
- - { path: "%sylius.security.admin_regex%/forgotten-password", role: IS_AUTHENTICATED_ANONYMOUSLY }
+ - { path: "%sylius.security.admin_regex%/forgotten-password", role: PUBLIC_ACCESS }
```
```diff
- - { path: "%sylius.security.admin_regex%/forgotten-password", role: IS_AUTHENTICATED_ANONYMOUSLY }
+ - { path: "%sylius.security.admin_regex%/forgotten-password", role: PUBLIC_ACCESS }
```
9. Passing a `Gaufrette\Filesystem` to `Sylius\Component\Core\Uploader\ImageUploader` constructor is deprecated since
Sylius 1.12 and will be prohibited in 2.0. Use `Sylius\Component\Core\Filesystem\Adapter\FlysystemFilesystemAdapter` instead.