Skip to content

Commit c05887a

Browse files
author
Valentin Nazarov
authored
Merge branch '5.4' into messenger-priority-stamp
2 parents 54b2379 + 781508d commit c05887a

File tree

2,390 files changed

+45795
-9525
lines changed

Some content is hidden

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

2,390 files changed

+45795
-9525
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: 🐛 Bug Report
2+
description: ⚠️ See below for security reports
3+
labels: Bug
4+
5+
body:
6+
- type: input
7+
id: affected-versions
8+
attributes:
9+
label: Symfony version(s) affected
10+
placeholder: x.y.z
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: description
15+
attributes:
16+
label: Description
17+
description: A clear and consise description of the problem
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: how-to-reproduce
22+
attributes:
23+
label: How to reproduce
24+
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
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: possible-solution
31+
attributes:
32+
label: Possible Solution
33+
description: "Optional: only if you have suggestions on a fix/reason for the bug"
34+
- type: textarea
35+
id: additional-context
36+
attributes:
37+
label: Additional Context
38+
description: "Optional: any other context about the problem: log messages, screenshots, etc."
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 🚀 Feature Request
2+
description: RFC and ideas for new features and improvements
3+
body:
4+
- type: textarea
5+
id: description
6+
attributes:
7+
label: Description
8+
description: A clear and concise description of the new feature
9+
validations:
10+
required: true
11+
- type: textarea
12+
id: example
13+
attributes:
14+
label: Example
15+
description: |
16+
A simple example of the new feature in action (include PHP code, YAML config, etc.)
17+
If the new feature changes an existing feature, include a simple before/after comparison.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
| Q | A
22
| ------------- | ---
3-
| Branch? | 5.4 for features / 4.4, 5.2 or 5.3 for bug fixes <!-- see below -->
3+
| Branch? | 5.4 for features / 4.4 or 5.3 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 -->

.github/patch-types.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,31 @@
1616
case false !== strpos($file = realpath($file), '/vendor/'):
1717
case false !== strpos($file, '/src/Symfony/Bridge/PhpUnit/'):
1818
case false !== strpos($file, '/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php'):
19+
case false !== strpos($file, '/src/Symfony/Component/Cache/Tests/Fixtures/DriverWrapper.php'):
1920
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadFileName.php'):
2021
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadParent.php'):
2122
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/ParseError.php'):
2223
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Compiler/OptionalServiceClass.php'):
2324
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php'):
25+
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/intersectiontype_classes.php'):
2426
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/MultipleArgumentsOptionalScalarNotReallyOptional.php'):
27+
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CheckTypeDeclarationsPass/IntersectionConstructor.php'):
2528
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ParentNotExists.php'):
2629
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/'):
2730
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/BadClasses/MissingParent.php'):
2831
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/'):
2932
case false !== strpos($file, '/src/Symfony/Component/ErrorHandler/Tests/Fixtures/'):
30-
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php'):
31-
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/ParentDummy.php'):
33+
case false !== strpos($file, '/src/Symfony/Component/Form/Tests/Fixtures/Answer.php'):
34+
case false !== strpos($file, '/src/Symfony/Component/Form/Tests/Fixtures/Number.php'):
35+
case false !== strpos($file, '/src/Symfony/Component/Form/Tests/Fixtures/Suit.php'):
36+
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/'):
37+
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php81Dummy.php'):
3238
case false !== strpos($file, '/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php'):
39+
case false !== strpos($file, '/src/Symfony/Component/Serializer/Tests/Fixtures/'):
3340
case false !== strpos($file, '/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ObjectOuter.php'):
41+
case false !== strpos($file, '/src/Symfony/Component/Validator/Tests/Fixtures/NestedAttribute/Entity.php'):
3442
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/NotLoadableClass.php'):
43+
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/ReflectionIntersectionTypeFixture.php'):
3544
continue 2;
3645
}
3746

.github/workflows/integration-tests.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ jobs:
122122
uses: shivammathur/setup-php@v2
123123
with:
124124
coverage: "none"
125-
extensions: "json,couchbase,memcached,mongodb,redis,rdkafka,xsl,ldap"
126-
ini-values: "memory_limit=-1"
125+
extensions: "json,couchbase,memcached,mongodb-1.10.0,redis,rdkafka,xsl,ldap"
126+
ini-values: date.timezone=Europe/Paris,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1
127127
php-version: "${{ matrix.php }}"
128128
tools: pecl
129129

@@ -136,7 +136,7 @@ jobs:
136136
uses: docker://bitnami/openldap
137137
with:
138138
entrypoint: /bin/bash
139-
args: -c "(/opt/bitnami/openldap/bin/ldapwhoami -h localhost:3389 -D cn=admin,dc=symfony,dc=com -w symfony||sleep 5) && /opt/bitnami/openldap/bin/ldapadd -h ldap:3389 -D cn=admin,dc=symfony,dc=com -w symfony -f src/Symfony/Component/Ldap/Tests/Fixtures/data/fixtures.ldif && /opt/bitnami/openldap/bin/ldapdelete -h ldap:3389 -D cn=admin,dc=symfony,dc=com -w symfony cn=a,ou=users,dc=symfony,dc=com"
139+
args: -c "(/opt/bitnami/openldap/bin/ldapwhoami -H ldap://ldap:3389 -D cn=admin,dc=symfony,dc=com -w symfony||sleep 5) && /opt/bitnami/openldap/bin/ldapadd -H ldap://ldap:3389 -D cn=admin,dc=symfony,dc=com -w symfony -f src/Symfony/Component/Ldap/Tests/Fixtures/data/fixtures.ldif && /opt/bitnami/openldap/bin/ldapdelete -H ldap://ldap:3389 -D cn=admin,dc=symfony,dc=com -w symfony cn=a,ou=users,dc=symfony,dc=com"
140140

141141
- name: Install dependencies
142142
run: |
@@ -146,7 +146,7 @@ jobs:
146146
echo COMPOSER_ROOT_VERSION=$COMPOSER_ROOT_VERSION >> $GITHUB_ENV
147147
148148
echo "::group::composer update"
149-
composer require --dev --no-update mongodb/mongodb:@stable
149+
composer require --dev --no-update mongodb/mongodb:"1.9.1@dev|^1.9.1@stable"
150150
composer update --no-progress --ansi
151151
echo "::endgroup::"
152152
@@ -180,3 +180,13 @@ jobs:
180180
# docker run --rm -e COMPOSER_ROOT_VERSION -v $(pwd):/app -v $(which composer):/usr/local/bin/composer -v $(which vulcain):/usr/local/bin/vulcain -w /app php:8.0-alpine ./phpunit src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php --filter testHttp2Push
181181
# sudo rm -rf .phpunit
182182
# [ -d .phpunit.bak ] && mv .phpunit.bak .phpunit
183+
184+
- uses: marceloprado/has-changed-path@v1
185+
id: changed-translation-files
186+
with:
187+
paths: src/**/Resources/translations/*.xlf
188+
189+
- name: Check Translation Status
190+
if: steps.changed-translation-files.outputs.changed == 'true'
191+
run: |
192+
php src/Symfony/Component/Translation/Resources/bin/translation-status.php -v

.github/workflows/psalm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: shivammathur/setup-php@v2
1818
with:
1919
php-version: '8.0'
20-
extensions: "json,memcached,mongodb,redis,xsl,ldap,dom"
20+
extensions: "json,couchbase,memcached,mongodb,redis,xsl,ldap,dom"
2121
ini-values: "memory_limit=-1"
2222
coverage: none
2323

@@ -52,4 +52,4 @@ jobs:
5252
5353
- name: Psalm
5454
run: |
55-
./vendor/bin/psalm.phar --output-format=github --no-progress
55+
./vendor/bin/psalm.phar --no-progress || ./vendor/bin/psalm.phar --output-format=github --no-progress

.github/workflows/unit-tests.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ jobs:
1515
runs-on: Ubuntu-20.04
1616

1717
env:
18-
extensions: amqp,apcu,igbinary,intl,mbstring,memcached,mongodb,redis
18+
extensions: amqp,apcu,igbinary,intl,mbstring,memcached,mongodb,redis-5.3.4
1919

2020
strategy:
2121
matrix:
2222
include:
2323
- php: '7.2'
24-
- php: '8.0'
24+
- php: '8.1'
2525
- php: '7.4'
2626
mode: high-deps
2727
- php: '8.0'
2828
mode: low-deps
29-
- php: '8.1'
29+
- php: '8.2'
3030
mode: experimental
3131
fail-fast: false
3232

@@ -36,17 +36,16 @@ jobs:
3636
with:
3737
fetch-depth: 2
3838

39-
- name: Configure for PHP 8.1
40-
if: "${{ matrix.php == '8.1' }}"
39+
- name: Configure for PHP >= 8.2
40+
if: "${{ matrix.php >= '8.2' }}"
4141
run: |
42-
echo "extensions=mbstring" >> $GITHUB_ENV
43-
composer config platform.php 8.0.99
42+
composer config platform.php 8.1.99
4443
4544
- name: Setup PHP
4645
uses: shivammathur/setup-php@v2
4746
with:
4847
coverage: "none"
49-
ini-values: date.timezone=Europe/Paris,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1
48+
ini-values: date.timezone=Europe/Paris,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1
5049
php-version: "${{ matrix.php }}"
5150
extensions: "${{ env.extensions }}"
5251
tools: flex
@@ -136,12 +135,14 @@ jobs:
136135
echo "::endgroup::"
137136
138137
- name: Patch return types
139-
if: "${{ matrix.php == '8.0' && ! matrix.mode }}"
138+
if: "${{ matrix.php == '8.1' && ! matrix.mode }}"
140139
run: |
141140
sed -i 's/"\*\*\/Tests\/"//' composer.json
142-
composer install --optimize-autoloader
143-
SYMFONY_PATCH_TYPE_DECLARATIONS=force=1 php .github/patch-types.php
144-
SYMFONY_PATCH_TYPE_DECLARATIONS=force=1 php .github/patch-types.php # ensure the script is idempotent
141+
git add .
142+
composer install -q --optimize-autoloader
143+
SYMFONY_PATCH_TYPE_DECLARATIONS='force=1&php=7.2' php .github/patch-types.php
144+
SYMFONY_PATCH_TYPE_DECLARATIONS='force=1&php=7.2' php .github/patch-types.php # ensure the script is idempotent
145+
git diff --exit-code
145146
echo PHPUNIT="$PHPUNIT,legacy" >> $GITHUB_ENV
146147
147148
- name: Run tests
@@ -184,24 +185,26 @@ jobs:
184185
# matrix.mode = high-deps
185186
echo "$COMPONENTS" | xargs -n1 | parallel -j +3 "_run_tests {} 'cd {} && $COMPOSER_UP && $PHPUNIT$LEGACY'" || X=1
186187
188+
# get a list of the patched components (relies on .github/build-packages.php being called in the previous step)
187189
(cd src/Symfony/Component/HttpFoundation; mv composer.bak composer.json)
188-
COMPONENTS=$(git diff --name-only src/ | grep composer.json || true)
190+
PATCHED_COMPONENTS=$(git diff --name-only src/ | grep composer.json || true)
189191
190-
if [[ $COMPONENTS && $SYMFONY_VERSION = *.4 ]]; then
192+
# for x.4 branches, checkout and test previous major with the patched components (only for patched components)
193+
if [[ $PATCHED_COMPONENTS && $SYMFONY_VERSION = *.4 ]]; then
191194
export FLIP='^'
192195
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
193196
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
194197
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
195198
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
196199
git fetch --depth=2 origin $SYMFONY_VERSION
197200
git checkout -m FETCH_HEAD
198-
COMPONENTS=$(echo "$COMPONENTS" | xargs dirname | xargs -n1 -I{} bash -c "[ -e '{}/phpunit.xml.dist' ] && echo '{}'" | sort || true)
201+
PATCHED_COMPONENTS=$(echo "$PATCHED_COMPONENTS" | xargs dirname | xargs -n1 -I{} bash -c "[ -e '{}/phpunit.xml.dist' ] && echo '{}'" | sort || true)
199202
(cd src/Symfony/Component/HttpFoundation; composer require --dev --no-update mongodb/mongodb)
200-
if [[ $COMPONENTS ]]; then
203+
if [[ $PATCHED_COMPONENTS ]]; then
201204
echo "::group::install phpunit"
202205
./phpunit install
203206
echo "::endgroup::"
204-
echo "$COMPONENTS" | parallel -j +3 "_run_tests {} 'cd {} && rm composer.lock vendor/ -Rf && $COMPOSER_UP && $PHPUNIT$LEGACY'" || X=1
207+
echo "$PATCHED_COMPONENTS" | parallel -j +3 "_run_tests {} 'cd {} && rm composer.lock vendor/ -Rf && $COMPOSER_UP && $PHPUNIT$LEGACY'" || X=1
205208
fi
206209
fi
207210

.php-cs-fixer.dist.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php')
4242
// explicit trigger_error tests
4343
->notPath('Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php')
44+
// stop removing spaces on the end of the line in strings
45+
->notPath('Symfony/Component/Messenger/Tests/Command/FailedMessagesShowCommandTest.php')
4446
)
4547
->setCacheFile('.php-cs-fixer.cache')
4648
;

CHANGELOG-5.2.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,53 @@ in 5.2 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v5.2.0...v5.2.1
99

10+
* 5.2.14 (2021-07-29)
11+
12+
* bug #42307 [Mailer] Fixed decode exception when sendgrid response is 202 (rubanooo)
13+
* bug #42296 [Dotenv][Yaml] Remove PHP 8.0 polyfill (derrabus)
14+
* bug #42289 [HttpFoundation] Fixed type mismatch (Toflar)
15+
16+
* 5.2.13 (2021-07-27)
17+
18+
* bug #42270 [WebProfilerBundle] [WebProfiler] "empty" filter bugfix. Filter with name "empty" is not … (luzrain)
19+
20+
* 5.2.12 (2021-07-26)
21+
22+
* bug #42212 [Lock] Handle lock with long key (jderusse)
23+
* bug #42223 [Debug][ErrorHandler] Do not use the php80 polyfill (nicolas-grekas)
24+
* bug #42207 [Console] fix table setHeaderTitle without headers (a1812)
25+
* bug #42130 [Translation] fix fallback to Locale::getDefault() (nicolas-grekas)
26+
* bug #42184 [Mailer] Make sure Http TransportException is not leaking (Nyholm)
27+
* bug #42091 [Console] Run commands when implements SignalableCommandInterface without pcntl and they have'nt signals (PaolaRuby)
28+
* bug #42150 [Form] Fix 'invalid_message' use in multiple ChoiceType (alexandre-daubois)
29+
* bug #42183 [Notifier] Allow passing a previous throwable to exceptions (derrabus)
30+
* bug #42182 [Notifier] Make sure Http TransportException is not leaking (Nyholm)
31+
* bug #42173 [Messenger] [Redis] Fix auth option wrongly considered invalid (chalasr)
32+
* bug #42174 Indicate compatibility with psr/log 2 and 3 (derrabus)
33+
* bug #42112 [HttpFoundation] fix FileBag under PHP 8.1 (alexpott)
34+
* bug #42131 [PhpUnitBridge] Fix composer resolution on Windows (Rainrider)
35+
* bug #42097 [DependencyInjection] Support for intersection types (derrabus)
36+
* bug #42114 [HttpFoundation] Fix return types of SessionHandler::gc() (derrabus)
37+
* bug #42099 [VarDumper] Support for intersection types (derrabus)
38+
* bug #42011 [Cache] Support decorated Dbal drivers in PdoAdapter (Jeroeny)
39+
* bug #42068 Add a Special Case for Translating Choices in en_US_POSIX (chrisguitarguy)
40+
* bug #42074 Fix ctype_digit deprecation (alexpott)
41+
* bug #42084 [WebProfilerBundle] Fix the values of some CSS properties (javiereguiluz)
42+
* bug #42079 [FrameworkBundle] Fixed file operations in Sodium vault seal (javiereguiluz)
43+
* bug #42067 [Messenger] [Redis] Make `auth` option works (welcoMattic)
44+
* bug #42054 [DoctrineBridge] fix setting default mapping type to attribute/annotation on php 8/7 respectively (nicolas-grekas)
45+
* bug #42059 [Messenger] Fixed BC layer for RedeliveryStamp (Nyholm)
46+
* bug #42049 [TwigBridge] do not render the same label id attribute twice (xabbuh)
47+
* bug #42032 [HttpKernel] recover from failed deserializations (xabbuh)
48+
* bug #42035 [Messenger] Fix use_notify default value for PostgreSqlConnection (tgalopin)
49+
* bug #41990 [Lock] fix derivating semaphore from key (nicolas-grekas)
50+
* bug #40529 [Translation] Missing translations from traits (insekticid)
51+
* bug #41384 Fix SkippedTestSuite (jderusse)
52+
* bug #41966 [Console] Revert "bug #41952 fix handling positional arguments" (chalasr, nicolas-grekas)
53+
* bug #41905 [EventDispatcher] Correct the called event listener method case (JJsty1e)
54+
* bug #41952 [Console] fix handling positional arguments (nicolas-grekas)
55+
* bug #41887 [PhpUnitBridge] Fix deprecation handler with PHPUnit 10 (YaFou)
56+
1057
* 5.2.11 (2021-06-30)
1158

1259
* bug #41893 [Filesystem] Workaround cannot dumpFile into "protected" folders on Windows (arnegroskurth)

0 commit comments

Comments
 (0)