Skip to content

Commit 58f1725

Browse files
committed
Rebase target branch
2 parents 6cc3036 + 2bac801 commit 58f1725

File tree

4,051 files changed

+126400
-77017
lines changed

Some content is hidden

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

4,051 files changed

+126400
-77017
lines changed

.github/CODEOWNERS

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,14 @@
3838
# Serializer
3939
/src/Symfony/Component/Serializer/ @dunglas
4040
# Security
41-
/src/Symfony/Bridge/Doctrine/Security/ @wouterj @chalasr
42-
/src/Symfony/Bundle/SecurityBundle/ @wouterj @chalasr
43-
/src/Symfony/Component/Security/ @wouterj @chalasr
44-
/src/Symfony/Component/Ldap/Security/ @wouterj @chalasr
41+
/src/Symfony/Bridge/Doctrine/Security/ @chalasr
42+
/src/Symfony/Bundle/SecurityBundle/ @chalasr
43+
/src/Symfony/Component/Security/ @chalasr
44+
/src/Symfony/Component/Ldap/Security/ @chalasr
45+
# Scheduler
46+
/src/Symfony/Component/Scheduler/ @kbond
47+
# Translation
48+
/src/Symfony/Component/Translation/ @welcomattic
4549
# TwigBundle
4650
/src/Symfony/Bundle/TwigBundle/ @yceruto
4751
# WebLink

.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? | 6.3 for features / 5.4 or 6.2 for bug fixes <!-- see below -->
3+
| Branch? | 6.4 for features / 5.4, or 6.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/composer-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"config": {
3+
"cache-vcs-dir": "/dev/null",
34
"platform-check": false,
45
"preferred-install": {
56
"symfony/form": "source",

.github/expected-missing-return-types.diff

Lines changed: 2075 additions & 1416 deletions
Large diffs are not rendered by default.

.github/patch-types.php

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

3-
if (false === getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) {
3+
$mode = $argv[1] ?? 'patch';
4+
if ('lint' !== $mode && false === getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) {
45
echo "Please define the SYMFONY_PATCH_TYPE_DECLARATIONS env var when running this script.\n";
56
exit(1);
67
}
@@ -11,6 +12,7 @@
1112

1213
Symfony\Component\ErrorHandler\DebugClassLoader::enable();
1314

15+
$missingReturnTypes = [];
1416
foreach ($loader->getClassMap() as $class => $file) {
1517
$file = realpath($file);
1618

@@ -22,6 +24,7 @@
2224
// no break;
2325
case false !== strpos($file, '/vendor/'):
2426
case false !== strpos($file, '/src/Symfony/Bridge/PhpUnit/'):
27+
case false !== strpos($file, '/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ContainerAwareController.php'):
2528
case false !== strpos($file, '/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php'):
2629
case false !== strpos($file, '/src/Symfony/Component/Cache/Tests/Fixtures/DriverWrapper.php'):
2730
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadFileName.php'):
@@ -53,13 +56,44 @@
5356
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/NotLoadableClass.php'):
5457
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/ReflectionIntersectionTypeFixture.php'):
5558
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/ReflectionUnionTypeWithIntersectionFixture.php'):
56-
case false !== strpos($file, '/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ReadOnlyClass.php'):
57-
case false !== strpos($file, '/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyProxy/ReadOnlyClass.php'):
59+
case false !== strpos($file, '/src/Symfony/Component/VarExporter/Internal'):
60+
case false !== strpos($file, '/src/Symfony/Component/VarExporter/Tests/Fixtures/'):
5861
case false !== strpos($file, '/src/Symfony/Component/Cache/Traits/RelayProxy.php'):
62+
case false !== strpos($file, '/src/Symfony/Contracts/Service/Test/ServiceLocatorTest.php'):
63+
case false !== strpos($file, '/src/Symfony/Contracts/Service/Test/ServiceLocatorTestCase.php'):
5964
continue 2;
6065
}
6166

6267
class_exists($class);
68+
69+
if ('lint' !== $mode) {
70+
continue;
71+
}
72+
73+
$refl = new \ReflectionClass($class);
74+
foreach ($refl->getMethods() as $method) {
75+
if (
76+
$method->getReturnType()
77+
|| str_contains($method->getDocComment(), '@return')
78+
|| '__construct' === $method->getName()
79+
|| '__destruct' === $method->getName()
80+
|| '__clone' === $method->getName()
81+
|| $method->getDeclaringClass()->getName() !== $class
82+
|| str_contains($method->getDeclaringClass()->getName(), '\\Test\\')
83+
) {
84+
continue;
85+
}
86+
87+
$missingReturnTypes[] = $class.'::'.$method->getName();
88+
}
6389
}
6490

65-
Symfony\Component\ErrorHandler\DebugClassLoader::checkClasses();
91+
if ($missingReturnTypes) {
92+
echo \count($missingReturnTypes)." missing return types on interfaces\n\n";
93+
echo implode("\n", $missingReturnTypes);
94+
exit(1);
95+
}
96+
97+
if ('patch' === $mode) {
98+
Symfony\Component\ErrorHandler\DebugClassLoader::checkClasses();
99+
}

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
services:
3030
postgres:
31-
image: postgres:9.6-alpine
31+
image: postgres:10.6-alpine
3232
ports:
3333
- 5432:5432
3434
env:

.github/workflows/intl-data-tests.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@ name: Intl data
33
on:
44
push:
55
paths:
6+
- 'src/Symfony/Component/Intl/*.php'
7+
- 'src/Symfony/Component/Intl/Util/GitRepository.php'
68
- 'src/Symfony/Component/Intl/Resources/data/**'
9+
- 'src/Symfony/Component/Intl/Tests/*Test.php'
10+
- 'src/Symfony/Component/Intl/Tests/Util/GitRepositoryTest.php'
711
pull_request:
812
paths:
13+
- 'src/Symfony/Component/Intl/*.php'
14+
- 'src/Symfony/Component/Intl/Util/GitRepository.php'
915
- 'src/Symfony/Component/Intl/Resources/data/**'
16+
- 'src/Symfony/Component/Intl/Tests/*Test.php'
17+
- 'src/Symfony/Component/Intl/Tests/Util/GitRepositoryTest.php'
1018

1119
defaults:
1220
run:
@@ -71,3 +79,16 @@ jobs:
7179

7280
- name: Run intl-data tests
7381
run: ./phpunit --group intl-data -v
82+
83+
- name: Test with compressed data
84+
run: |
85+
[ -f src/Symfony/Component/Intl/Resources/data/locales/en.php ]
86+
[ ! -f src/Symfony/Component/Intl/Resources/data/locales/en.php.gz ]
87+
[ -f src/Symfony/Component/Intl/Resources/data/transliterator/emoji/emoji-en.php ]
88+
[ ! -f src/Symfony/Component/Intl/Resources/data/transliterator/emoji/emoji-en.php.gz ]
89+
src/Symfony/Component/Intl/Resources/bin/compress
90+
[ ! -f src/Symfony/Component/Intl/Resources/data/locales/en.php ]
91+
[ -f src/Symfony/Component/Intl/Resources/data/locales/en.php.gz ]
92+
[ ! -f src/Symfony/Component/Intl/Resources/data/transliterator/emoji/emoji-en.php ]
93+
[ -f src/Symfony/Component/Intl/Resources/data/transliterator/emoji/emoji-en.php.gz ]
94+
./phpunit src/Symfony/Component/Intl

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
schedule:
77
- cron: '34 4 * * 6'
88
push:
9-
branches: [ "6.3" ]
9+
branches: [ "6.4" ]
1010

1111
# Declare default permissions as read only.
1212
permissions: read-all

.github/workflows/unit-tests.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
matrix:
2828
include:
2929
- php: '8.1'
30-
- php: '8.1'
30+
- php: '8.2'
3131
mode: high-deps
32-
- php: '8.1'
33-
mode: low-deps
3432
- php: '8.2'
33+
mode: low-deps
34+
- php: '8.3'
3535
#mode: experimental
3636
fail-fast: false
3737

@@ -59,12 +59,14 @@ jobs:
5959
git config --global init.defaultBranch main
6060
git config --global advice.detachedHead false
6161
62+
(php --ri relay 2>&1 > /dev/null) || sudo rm /etc/php/*/cli/conf.d/20-relay.ini
63+
6264
COMPOSER_HOME="$(composer config home)"
6365
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
6466
6567
echo COLUMNS=120 >> $GITHUB_ENV
6668
echo PHPUNIT="$(pwd)/phpunit --exclude-group tty,benchmark,intl-data,integration" >> $GITHUB_ENV
67-
echo COMPOSER_UP='composer update --no-progress --ansi'$([[ "${{ matrix.php }}" = "8.2" ]] && echo ' --ignore-platform-req=php+') >> $GITHUB_ENV
69+
echo COMPOSER_UP='composer update --no-progress --ansi'$([[ "${{ matrix.mode }}" != low-deps ]] && echo ' --ignore-platform-req=php+') >> $GITHUB_ENV
6870
6971
SYMFONY_VERSIONS=$(git ls-remote -q --heads | cut -f2 | grep -o '/[1-9][0-9]*\.[0-9].*' | sort -V)
7072
SYMFONY_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | cut -d "'" -f2 | cut -d '.' -f 1-2)
@@ -123,7 +125,7 @@ jobs:
123125
124126
echo SYMFONY_VERSION=$SYMFONY_VERSION >> $GITHUB_ENV
125127
echo COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev >> $GITHUB_ENV
126-
echo SYMFONY_REQUIRE=">=$([ '${{ matrix.mode }}' = low-deps ] && echo 4.4 || echo $SYMFONY_VERSION)" >> $GITHUB_ENV
128+
echo SYMFONY_REQUIRE=">=$([ '${{ matrix.mode }}' = low-deps ] && echo 5.4 || echo $SYMFONY_VERSION)" >> $GITHUB_ENV
127129
[[ "${{ matrix.mode }}" = *-deps ]] && mv composer.json.phpunit composer.json || true
128130
129131
- name: Install dependencies
@@ -141,13 +143,18 @@ jobs:
141143
run: |
142144
patch -sp1 < .github/expected-missing-return-types.diff
143145
git add .
144-
composer install -q --optimize-autoloader
146+
composer install -q --optimize-autoloader || composer install --optimize-autoloader
145147
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.1' php .github/patch-types.php
146148
git checkout src/Symfony/Contracts/Service/ResetInterface.php
147149
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.1' php .github/patch-types.php # ensure the script is idempotent
148150
git checkout src/Symfony/Contracts/Service/ResetInterface.php
149151
git diff --exit-code
150152
153+
- name: Check return types
154+
if: "matrix.php == '8.1' && ! matrix.mode"
155+
run: |
156+
php .github/patch-types.php lint
157+
151158
- name: Run tests
152159
run: |
153160
_run_tests() {
@@ -194,8 +201,8 @@ jobs:
194201
(cd src/Symfony/Component/Lock; mv composer.bak composer.json)
195202
PATCHED_COMPONENTS=$(git diff --name-only src/ | grep composer.json || true)
196203
197-
# for 5.4 LTS, checkout and test previous major with the patched components (only for patched components)
198-
if [[ $PATCHED_COMPONENTS && $SYMFONY_VERSION = 5.4 ]]; then
204+
# for 6.4 LTS, checkout and test previous major with the patched components (only for patched components)
205+
if [[ $PATCHED_COMPONENTS && $SYMFONY_VERSION = 6.4 ]]; then
199206
export FLIP='^'
200207
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
201208
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
@@ -230,4 +237,6 @@ jobs:
230237
tar -xjf php-8.1.2-pcntl-sigchild.tar.bz2
231238
cd ..
232239
240+
mkdir -p /opt/php/lib
241+
echo memory_limit=-1 > /opt/php/lib/php.ini
233242
./build/php/bin/php ./phpunit --colors=always src/Symfony/Component/Process

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