Skip to content

Commit aad2242

Browse files
Merge branch '5.4' into lock-table-creation
* 5.4: (32 commits) Remove duplicated entry in UPGRADE-6.0.md Fix KernelBrowser::loginUser() causing deprecation Handle alias in completion script use $sessionId instead of $sessionCookiePath on SessionUtils::popSessionCookie call Fix TranslationTrait for multiple domains Fix parameter types for ProcessHelper::mustRun() Fix: Wording [SecurityBundle] Fix ambiguous deprecation message on missing provider Remove dead code in tests [Translation][Loco] Make http requests synchronous when reading the Loco API Remove return void PHPDoc in test Fix merge Fix compatibility with symfony/security-core 6.x Don't rely on deprecated strategy constants Use external links instead of fake issue templates Fix description that does not work well Document deprecations in Security Tokens Add missing files from 5.3 Remove unneeded files Tweak bug report template ...
2 parents e16b64a + 060d328 commit aad2242

File tree

47 files changed

+436
-255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+436
-255
lines changed

.github/ISSUE_TEMPLATE/1_Bug_report.md

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

.github/ISSUE_TEMPLATE/1_Bug_report.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 🐛 Bug Report
2-
description: ⚠️ See below for security reports
2+
description: ⚠️ NEVER report security issues, read https://symfony.com/security instead
33
labels: Bug
44

55
body:
@@ -14,23 +14,29 @@ body:
1414
id: description
1515
attributes:
1616
label: Description
17-
description: A clear and consise description of the problem
17+
description: A clear and concise description of the problem
1818
validations:
1919
required: true
2020
- type: textarea
2121
id: how-to-reproduce
2222
attributes:
2323
label: How to reproduce
2424
description: |
25-
Code and/or config needed to reproduce the problem.
26-
If it's a complex bug, create a "bug reproducer" as explained in https://symfony.com/doc/current/contributing/code/reproducer.html
25+
⚠️ This is the most important part of the report ⚠️
26+
Without a way to easily reproduce your issue, there is little chance we will be able to help you and work on a fix.
27+
Please, take the time to show us some code and/or config that is needed for others to reproduce the problem easily.
28+
Most of the time, creating a "bug reproducer" as explained in the URL below is the best way to help us
29+
and increases the chances someone will have a look at it:
30+
https://symfony.com/doc/current/contributing/code/reproducer.html
2731
validations:
2832
required: true
2933
- type: textarea
3034
id: possible-solution
3135
attributes:
3236
label: Possible Solution
33-
description: "Optional: only if you have suggestions on a fix/reason for the bug"
37+
description: |
38+
Optional: only if you have suggestions on a fix/reason for the bug
39+
Don't hesitate to create a pull request with your solution, it helps get faster feedback.
3440
- type: textarea
3541
id: additional-context
3642
attributes:

.github/ISSUE_TEMPLATE/2_Feature_request.md

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

.github/ISSUE_TEMPLATE/3_Support_question.md

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

.github/ISSUE_TEMPLATE/4_Documentation_issue.md

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

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Support Question
4+
url: https://symfony.com/support
5+
about: We use GitHub issues only to discuss about Symfony bugs and new features. For this kind of questions about using Symfony or third-party bundles, please use any of the support alternatives shown in https://symfony.com/support
6+
- name: Documentation Issue
7+
url: https://github.com/symfony/symfony-docs/issues
8+
about: Symfony Documentation has its own dedicated repository.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
| Q | A
22
| ------------- | ---
3-
| Branch? | 5.4 for features / 4.4 or 5.3 for bug fixes <!-- see below -->
3+
| Branch? | 6.1 for features / 4.4, 5.3, 5.4 or 6.0 for bug fixes <!-- see below -->
44
| Bug fix? | yes/no
55
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
66
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
77
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
88
| License | MIT
99
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
1010
<!--
11-
Replace this notice by a short README for your feature/bugfix. This will help people
12-
understand your PR and can be used as a start for the documentation.
11+
Replace this notice by a short README for your feature/bugfix.
12+
This will help reviewers and should be a good start for the documentation.
1313
1414
Additionally (see https://symfony.com/releases):
1515
- Always add tests and ensure they pass.
16-
- Never break backward compatibility (see https://symfony.com/bc).
1716
- Bug fixes must be submitted against the lowest maintained branch where they apply
1817
(lowest branches are regularly merged to upper ones so they get the fixes too.)
1918
- Features and deprecations must be submitted against branch 5.x.
2019
- Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
20+
- Never break backward compatibility (see https://symfony.com/bc).
2121
-->

.github/workflows/unit-tests.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
matrix:
2222
include:
2323
- php: '7.2'
24-
- php: '8.1'
2524
- php: '7.4'
26-
mode: high-deps
2725
- php: '8.0'
26+
mode: high-deps
27+
- php: '8.1'
2828
mode: low-deps
2929
- php: '8.2'
3030
mode: experimental
@@ -174,19 +174,21 @@ jobs:
174174
exit 0
175175
fi
176176
177-
(cd src/Symfony/Component/HttpFoundation; cp composer.json composer.bak; composer require --dev --no-update mongodb/mongodb)
178-
179177
if [[ "${{ matrix.mode }}" = low-deps ]]; then
180178
echo "$COMPONENTS" | xargs -n1 | parallel -j +3 "_run_tests {} 'cd {} && $COMPOSER_UP --prefer-lowest --prefer-stable && $PHPUNIT'"
181179
182180
exit 0
183181
fi
184182
183+
(cd src/Symfony/Component/HttpFoundation; cp composer.json composer.bak; composer require --dev --no-update mongodb/mongodb)
184+
(cd src/Symfony/Component/Lock; cp composer.json composer.bak; composer require --dev --no-update mongodb/mongodb)
185+
185186
# matrix.mode = high-deps
186187
echo "$COMPONENTS" | xargs -n1 | parallel -j +3 "_run_tests {} 'cd {} && $COMPOSER_UP && $PHPUNIT$LEGACY'" || X=1
187188
188189
# get a list of the patched components (relies on .github/build-packages.php being called in the previous step)
189190
(cd src/Symfony/Component/HttpFoundation; mv composer.bak composer.json)
191+
(cd src/Symfony/Component/Lock; mv composer.bak composer.json)
190192
PATCHED_COMPONENTS=$(git diff --name-only src/ | grep composer.json || true)
191193
192194
# for 5.4 LTS, checkout and test previous major with the patched components (only for patched components)
@@ -200,6 +202,7 @@ jobs:
200202
git checkout -m FETCH_HEAD
201203
PATCHED_COMPONENTS=$(echo "$PATCHED_COMPONENTS" | xargs dirname | xargs -n1 -I{} bash -c "[ -e '{}/phpunit.xml.dist' ] && echo '{}'" | sort || true)
202204
(cd src/Symfony/Component/HttpFoundation; composer require --dev --no-update mongodb/mongodb)
205+
(cd src/Symfony/Component/Lock; composer require --dev --no-update mongodb/mongodb)
203206
if [[ $PATCHED_COMPONENTS ]]; then
204207
echo "::group::install phpunit"
205208
./phpunit install

UPGRADE-5.4.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,19 @@ Security
170170
* Deprecate passing the strategy as string to `AccessDecisionManager`,
171171
pass an instance of `AccessDecisionStrategyInterface` instead
172172
* Flag `AccessDecisionManager` as `@final`
173+
* Deprecate passing `$credentials` to `PreAuthenticatedToken`,
174+
`SwitchUserToken` and `UsernamePasswordToken`:
175+
176+
Before:
177+
```php
178+
$token = new UsernamePasswordToken($user, $credentials, $firewallName, $roles);
179+
$token = new PreAuthenticatedToken($user, $credentials, $firewallName, $roles);
180+
$token = new SwitchUserToken($user, $credentials, $firewallName, $roles, $originalToken);
181+
```
182+
183+
After:
184+
```php
185+
$token = new UsernamePasswordToken($user, $firewallName, $roles);
186+
$token = new PreAuthenticatedToken($user, $firewallName, $roles);
187+
$token = new SwitchUserToken($user, $firewallName, $roles, $originalToken);
188+
```

UPGRADE-6.0.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ HttpFoundation
124124
* Removed the `Request::HEADER_X_FORWARDED_ALL` constant, use either `Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO` or `Request::HEADER_X_FORWARDED_AWS_ELB` or `Request::HEADER_X_FORWARDED_TRAEFIK`constants instead
125125
* Rename `RequestStack::getMasterRequest()` to `getMainRequest()`
126126
* Not passing `FILTER_REQUIRE_ARRAY` or `FILTER_FORCE_ARRAY` flags to `InputBag::filter()` when filtering an array will throw `BadRequestException`
127-
* Removed the `Request::HEADER_X_FORWARDED_ALL` constant
128127
* Retrieving non-scalar values using `InputBag::get()` will throw `BadRequestException` (use `InputBad::all()` instead to retrieve an array)
129128
* Passing non-scalar default value as the second argument `InputBag::get()` will throw `\InvalidArgumentException`
130129
* Passing non-scalar, non-array value as the second argument `InputBag::set()` will throw `\InvalidArgumentException`
@@ -408,6 +407,22 @@ Security
408407
```
409408
* `AccessDecisionManager` does not accept strings as strategy anymore,
410409
pass an instance of `AccessDecisionStrategyInterface` instead
410+
* Removed the `$credentials` argument of `PreAuthenticatedToken`,
411+
`SwitchUserToken` and `UsernamePasswordToken`:
412+
413+
Before:
414+
```php
415+
$token = new UsernamePasswordToken($user, $credentials, $firewallName, $roles);
416+
$token = new PreAuthenticatedToken($user, $credentials, $firewallName, $roles);
417+
$token = new SwitchUserToken($user, $credentials, $firewallName, $roles, $originalToken);
418+
```
419+
420+
After:
421+
```php
422+
$token = new UsernamePasswordToken($user, $firewallName, $roles);
423+
$token = new PreAuthenticatedToken($user, $firewallName, $roles);
424+
$token = new SwitchUserToken($user, $firewallName, $roles, $originalToken);
425+
```
411426

412427
SecurityBundle
413428
--------------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy