Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16c4691

Browse files
authored
Merge branch '7.1' into inflector_plural_hardware
2 parents f829722 + 31c597f commit 16c4691

File tree

3,988 files changed

+124931
-47627
lines changed

Some content is hidden

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

3,988 files changed

+124931
-47627
lines changed

.git-blame-ignore-revs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
2+
f4118e110a46de3ffb799e7d79bf15128d1646ea
3+
9519b54417c09c49496a4a6be238e63be9a73465
4+
ae0a783425b80b78376488619bf9106e69193fa4
5+
9c1e36257c4df0929179462d6b2bdd00453ac8aa
6+
6ae74d38e3d20d0ffcc66c7c3d28767fab76bdfb

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55
/src/Symfony/Component/Notifier/Bridge export-ignore
66
/src/Symfony/Component/Runtime export-ignore
77
/src/Symfony/Component/Translation/Bridge export-ignore
8+
/src/Symfony/Component/Emoji/Resources/data/* linguist-generated=true
89
/src/Symfony/Component/Intl/Resources/data/*/* linguist-generated=true
10+
/.git* export-ignore

.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? | 7.1 for features / 5.4, 6.3, 6.4, or 7.0 for bug fixes <!-- see below -->
3+
| Branch? | 7.2 for features / 5.4, 6.4, 7.0, and 7.1 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/expected-missing-return-types.diff

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,35 @@ git checkout composer.json src/
1010
diff --git a/src/Symfony/Component/BrowserKit/AbstractBrowser.php b/src/Symfony/Component/BrowserKit/AbstractBrowser.php
1111
--- a/src/Symfony/Component/BrowserKit/AbstractBrowser.php
1212
+++ b/src/Symfony/Component/BrowserKit/AbstractBrowser.php
13-
@@ -411,5 +411,5 @@ abstract class AbstractBrowser
13+
@@ -407,5 +407,5 @@ abstract class AbstractBrowser
1414
* @throws \RuntimeException When processing returns exit code
1515
*/
1616
- protected function doRequestInProcess(object $request)
1717
+ protected function doRequestInProcess(object $request): object
1818
{
1919
$deprecationsFile = tempnam(sys_get_temp_dir(), 'deprec');
20-
@@ -444,5 +444,5 @@ abstract class AbstractBrowser
20+
@@ -440,5 +440,5 @@ abstract class AbstractBrowser
2121
* @return object
2222
*/
2323
- abstract protected function doRequest(object $request);
2424
+ abstract protected function doRequest(object $request): object;
25-
25+
2626
/**
27-
@@ -455,5 +455,5 @@ abstract class AbstractBrowser
27+
@@ -451,5 +451,5 @@ abstract class AbstractBrowser
2828
* @throws LogicException When this abstract class is not implemented
2929
*/
3030
- protected function getScript(object $request)
3131
+ protected function getScript(object $request): string
3232
{
3333
throw new LogicException('To insulate requests, you need to override the getScript() method.');
34-
@@ -465,5 +465,5 @@ abstract class AbstractBrowser
34+
@@ -461,5 +461,5 @@ abstract class AbstractBrowser
3535
* @return object
3636
*/
3737
- protected function filterRequest(Request $request)
3838
+ protected function filterRequest(Request $request): object
3939
{
4040
return $request;
41-
@@ -475,5 +475,5 @@ abstract class AbstractBrowser
41+
@@ -471,5 +471,5 @@ abstract class AbstractBrowser
4242
* @return Response
4343
*/
4444
- protected function filterResponse(object $response)
@@ -146,21 +146,21 @@ diff --git a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterf
146146
*/
147147
- public function load(array $configs, ContainerBuilder $container);
148148
+ public function load(array $configs, ContainerBuilder $container): void;
149-
149+
150150
/**
151151
@@ -37,5 +37,5 @@ interface ExtensionInterface
152152
* @return string
153153
*/
154154
- public function getNamespace();
155155
+ public function getNamespace(): string;
156-
156+
157157
/**
158158
@@ -44,5 +44,5 @@ interface ExtensionInterface
159159
* @return string|false
160160
*/
161161
- public function getXsdValidationBasePath();
162162
+ public function getXsdValidationBasePath(): string|false;
163-
163+
164164
/**
165165
@@ -53,4 +53,4 @@ interface ExtensionInterface
166166
* @return string
@@ -249,35 +249,35 @@ diff --git a/src/Symfony/Component/Form/FormTypeInterface.php b/src/Symfony/Comp
249249
*/
250250
- public function getParent();
251251
+ public function getParent(): ?string;
252-
252+
253253
/**
254254
@@ -34,5 +34,5 @@ interface FormTypeInterface
255255
* @return void
256256
*/
257257
- public function configureOptions(OptionsResolver $resolver);
258258
+ public function configureOptions(OptionsResolver $resolver): void;
259-
259+
260260
/**
261261
@@ -48,5 +48,5 @@ interface FormTypeInterface
262262
* @see FormTypeExtensionInterface::buildForm()
263263
*/
264264
- public function buildForm(FormBuilderInterface $builder, array $options);
265265
+ public function buildForm(FormBuilderInterface $builder, array $options): void;
266-
266+
267267
/**
268268
@@ -66,5 +66,5 @@ interface FormTypeInterface
269269
* @see FormTypeExtensionInterface::buildView()
270270
*/
271271
- public function buildView(FormView $view, FormInterface $form, array $options);
272272
+ public function buildView(FormView $view, FormInterface $form, array $options): void;
273-
273+
274274
/**
275275
@@ -85,5 +85,5 @@ interface FormTypeInterface
276276
* @see FormTypeExtensionInterface::finishView()
277277
*/
278278
- public function finishView(FormView $view, FormInterface $form, array $options);
279279
+ public function finishView(FormView $view, FormInterface $form, array $options): void;
280-
280+
281281
/**
282282
@@ -95,4 +95,4 @@ interface FormTypeInterface
283283
* @return string
@@ -324,21 +324,21 @@ diff --git a/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php b/src/S
324324
*/
325325
- public function boot();
326326
+ public function boot(): void;
327-
327+
328328
/**
329329
@@ -35,5 +35,5 @@ interface BundleInterface
330330
* @return void
331331
*/
332332
- public function shutdown();
333333
+ public function shutdown(): void;
334-
334+
335335
/**
336336
@@ -44,5 +44,5 @@ interface BundleInterface
337337
* @return void
338338
*/
339339
- public function build(ContainerBuilder $container);
340340
+ public function build(ContainerBuilder $container): void;
341-
341+
342342
/**
343343
diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
344344
--- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
@@ -356,9 +356,9 @@ diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterfa
356356
@@ -28,5 +28,5 @@ interface DataCollectorInterface extends ResetInterface
357357
* @return void
358358
*/
359-
- public function collect(Request $request, Response $response, \Throwable $exception = null);
360-
+ public function collect(Request $request, Response $response, \Throwable $exception = null): void;
361-
359+
- public function collect(Request $request, Response $response, ?\Throwable $exception = null);
360+
+ public function collect(Request $request, Response $response, ?\Throwable $exception = null): void;
361+
362362
/**
363363
@@ -35,4 +35,4 @@ interface DataCollectorInterface extends ResetInterface
364364
* @return string
@@ -383,38 +383,38 @@ diff --git a/src/Symfony/Component/HttpKernel/KernelInterface.php b/src/Symfony/
383383
*/
384384
- public function registerContainerConfiguration(LoaderInterface $loader);
385385
+ public function registerContainerConfiguration(LoaderInterface $loader): void;
386-
386+
387387
/**
388388
@@ -44,5 +44,5 @@ interface KernelInterface extends HttpKernelInterface
389389
* @return void
390390
*/
391391
- public function boot();
392392
+ public function boot(): void;
393-
393+
394394
/**
395395
@@ -53,5 +53,5 @@ interface KernelInterface extends HttpKernelInterface
396396
* @return void
397397
*/
398398
- public function shutdown();
399399
+ public function shutdown(): void;
400-
400+
401401
/**
402402
diff --git a/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php b/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
403403
--- a/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
404404
+++ b/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
405-
@@ -226,5 +226,5 @@ abstract class AttributeClassLoader implements LoaderInterface
405+
@@ -234,5 +234,5 @@ abstract class AttributeClassLoader implements LoaderInterface
406406
* @return string
407407
*/
408408
- protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method)
409409
+ protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method): string
410410
{
411411
$name = str_replace('\\', '_', $class->name).'_'.$method->name;
412-
@@ -325,5 +325,5 @@ abstract class AttributeClassLoader implements LoaderInterface
412+
@@ -333,5 +333,5 @@ abstract class AttributeClassLoader implements LoaderInterface
413413
* @return void
414414
*/
415415
- abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot);
416416
+ abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot): void;
417-
417+
418418
/**
419419
diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php
420420
--- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php
@@ -424,21 +424,21 @@ diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/Token
424424
*/
425425
- public function loadTokenBySeries(string $series);
426426
+ public function loadTokenBySeries(string $series): PersistentTokenInterface;
427-
427+
428428
/**
429429
@@ -35,5 +35,5 @@ interface TokenProviderInterface
430430
* @return void
431431
*/
432432
- public function deleteTokenBySeries(string $series);
433433
+ public function deleteTokenBySeries(string $series): void;
434-
434+
435435
/**
436436
@@ -44,5 +44,5 @@ interface TokenProviderInterface
437437
* @throws TokenNotFoundException if the token is not found
438438
*/
439439
- public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTimeInterface $lastUsed);
440440
+ public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTimeInterface $lastUsed): void;
441-
441+
442442
/**
443443
@@ -51,4 +51,4 @@ interface TokenProviderInterface
444444
* @return void
@@ -485,7 +485,7 @@ diff --git a/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php
485485
*/
486486
- public function extract(string|iterable $resource, MessageCatalogue $catalogue);
487487
+ public function extract(string|iterable $resource, MessageCatalogue $catalogue): void;
488-
488+
489489
/**
490490
@@ -36,4 +36,4 @@ interface ExtractorInterface
491491
* @return void
@@ -501,7 +501,7 @@ diff --git a/src/Symfony/Component/Validator/ConstraintValidatorInterface.php b/
501501
*/
502502
- public function initialize(ExecutionContextInterface $context);
503503
+ public function initialize(ExecutionContextInterface $context): void;
504-
504+
505505
/**
506506
@@ -31,4 +31,4 @@ interface ConstraintValidatorInterface
507507
* @return void
@@ -526,7 +526,7 @@ diff --git a/src/Symfony/Contracts/Translation/LocaleAwareInterface.php b/src/Sy
526526
*/
527527
- public function setLocale(string $locale);
528528
+ public function setLocale(string $locale): void;
529-
529+
530530
/**
531531
diff --git a/src/Symfony/Contracts/Translation/TranslatorTrait.php b/src/Symfony/Contracts/Translation/TranslatorTrait.php
532532
--- a/src/Symfony/Contracts/Translation/TranslatorTrait.php

.github/get-modified-packages.php

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,15 @@
1919

2020
function getPackageType(string $packageDir): string
2121
{
22-
if (preg_match('@Symfony/Bridge/@', $packageDir)) {
23-
return 'bridge';
24-
}
25-
26-
if (preg_match('@Symfony/Bundle/@', $packageDir)) {
27-
return 'bundle';
28-
}
29-
30-
if (preg_match('@Symfony/Component/[^/]+/Bridge/@', $packageDir)) {
31-
return 'component_bridge';
32-
}
33-
34-
if (preg_match('@Symfony/Component/@', $packageDir)) {
35-
return 'component';
36-
}
37-
38-
if (preg_match('@Symfony/Contracts/@', $packageDir)) {
39-
return 'contract';
40-
}
41-
42-
if (preg_match('@Symfony/Contracts$@', $packageDir)) {
43-
return 'contracts';
44-
}
45-
46-
throw new \LogicException();
22+
return match (true) {
23+
str_contains($packageDir, 'Symfony/Bridge/') => 'bridge',
24+
str_contains($packageDir, 'Symfony/Bundle/') => 'bundle',
25+
preg_match('@Symfony/Component/[^/]+/Bridge/@', $packageDir) => 'component_bridge',
26+
str_contains($packageDir, 'Symfony/Component/') => 'component',
27+
str_contains($packageDir, 'Symfony/Contracts/') => 'contract',
28+
str_ends_with($packageDir, 'Symfony/Contracts') => 'contracts',
29+
default => throw new \LogicException(),
30+
};
4731
}
4832

4933
$newPackage = [];

.github/patch-types.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
case false !== strpos($file, '/vendor/'):
2626
case false !== strpos($file, '/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php'):
2727
case false !== strpos($file, '/src/Symfony/Bridge/Doctrine/Middleware/Debug/'):
28+
case false !== strpos($file, '/src/Symfony/Bridge/Doctrine/Tests/Fixtures/LegacyQueryMock.php'):
2829
case false !== strpos($file, '/src/Symfony/Bridge/PhpUnit/'):
2930
case false !== strpos($file, '/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php'):
3031
case false !== strpos($file, '/src/Symfony/Component/Cache/Tests/Fixtures/DriverWrapper.php'):

.github/sync-packages.php

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<?php
2+
3+
if ('cli' !== PHP_SAPI) {
4+
echo "This script can only be run from the command line.\n";
5+
exit(1);
6+
}
7+
8+
$mainRepo = 'https://github.com/symfony/symfony';
9+
exec('find src/ -name composer.json', $packages);
10+
11+
foreach ($packages as $package) {
12+
$package = dirname($package);
13+
14+
if (str_contains($package, '/Resources/')) {
15+
continue;
16+
}
17+
18+
$c = file_get_contents($package.'/.gitattributes');
19+
$c = preg_replace('{^/\.git.*+\n}m', '', $c);
20+
$c .= "/.git* export-ignore\n";
21+
file_put_contents($package.'/.gitattributes', $c);
22+
23+
24+
@mkdir($package.'/.github');
25+
file_put_contents($package.'/.github/PULL_REQUEST_TEMPLATE.md', <<<EOTXT
26+
Please do not submit any Pull Requests here. They will be closed.
27+
---
28+
29+
Please submit your PR here instead:
30+
{$mainRepo}
31+
32+
This repository is what we call a "subtree split": a read-only subset of that main repository.
33+
We're looking forward to your PR there!
34+
35+
EOTXT
36+
);
37+
38+
@mkdir($package.'/.github/workflows');
39+
file_put_contents($package.'/.github/workflows/check-subtree-split.yml', <<<EOTXT
40+
name: Check subtree split
41+
42+
on:
43+
pull_request_target:
44+
45+
jobs:
46+
close-pull-request:
47+
runs-on: ubuntu-latest
48+
49+
steps:
50+
- name: Close pull request
51+
uses: actions/github-script@v6
52+
with:
53+
script: |
54+
if (context.repo.owner === "symfony") {
55+
github.rest.issues.createComment({
56+
owner: "symfony",
57+
repo: context.repo.repo,
58+
issue_number: context.issue.number,
59+
body: `
60+
Thanks for your Pull Request! We love contributions.
61+
62+
However, you should instead open your PR on the main repository:
63+
{$mainRepo}
64+
65+
This repository is what we call a "subtree split": a read-only subset of that main repository.
66+
We're looking forward to your PR there!
67+
`
68+
});
69+
70+
github.rest.pulls.update({
71+
owner: "symfony",
72+
repo: context.repo.repo,
73+
pull_number: context.issue.number,
74+
state: "closed"
75+
});
76+
}
77+
78+
EOTXT
79+
);
80+
}

0 commit comments

Comments
 (0)