Skip to content

Commit 0cc5ae0

Browse files
authored
Merge branch '4.4' into check-type-hint
2 parents 799b461 + e3aed10 commit 0cc5ae0

File tree

3,362 files changed

+52009
-22102
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,362 files changed

+52009
-22102
lines changed

.appveyor.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ init:
1212
- SET SYMFONY_DEPRECATIONS_HELPER=strict
1313
- SET "SYMFONY_REQUIRE=>=4.2"
1414
- SET ANSICON=121x90 (121x90)
15+
- SET SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1
1516
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
1617

1718
install:
@@ -28,6 +29,7 @@ install:
2829
- echo max_execution_time=1200 >> php.ini-min
2930
- echo date.timezone="America/Los_Angeles" >> php.ini-min
3031
- echo extension_dir=ext >> php.ini-min
32+
- echo extension=php_xsl.dll >> php.ini-min
3133
- copy /Y php.ini-min php.ini-max
3234
- echo zend_extension=php_opcache.dll >> php.ini-max
3335
- echo opcache.enable_cli=1 >> php.ini-max
@@ -41,9 +43,9 @@ install:
4143
- echo extension=php_curl.dll >> php.ini-max
4244
- copy /Y php.ini-max php.ini
4345
- cd c:\projects\symfony
44-
- IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/1.7.1/composer.phar)
46+
- IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/1.9.0/composer.phar)
4547
- php composer.phar self-update
46-
- copy /Y .composer\* %APPDATA%\Composer\
48+
- copy /Y .github\composer-config.json %APPDATA%\Composer\config.json
4749
- php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex dev-master
4850
- php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit src\Symfony\Contracts
4951
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
@@ -55,7 +57,7 @@ test_script:
5557
- SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped
5658
- copy /Y c:\php\php.ini-min c:\php\php.ini
5759
- IF %APPVEYOR_REPO_BRANCH% neq master (rm -Rf src\Symfony\Bridge\PhpUnit)
58-
- php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel!
60+
- php phpunit src\Symfony --exclude-group tty,benchmark,intl-data || SET X=!errorlevel!
5961
- copy /Y c:\php\php.ini-max c:\php\php.ini
60-
- php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel!
62+
- php phpunit src\Symfony --exclude-group tty,benchmark,intl-data || SET X=!errorlevel!
6163
- exit %X%

.composer/config.json

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

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/src/Symfony/Component/Console/Logger/ConsoleLogger.php @dunglas
33
# DependencyInjection
44
/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @dunglas
5+
# ErrorRenderer
6+
/src/Symfony/Component/ErrorRenderer/* @yceruto
57
# Form
68
/src/Symfony/Bridge/Twig/Extension/FormExtension.php @xabbuh
79
/src/Symfony/Bridge/Twig/Form/* @xabbuh
@@ -33,6 +35,8 @@
3335
/src/Symfony/Bridge/Doctrine/PropertyInfo/* @dunglas
3436
# Serializer
3537
/src/Symfony/Component/Serializer/* @dunglas
38+
# TwigBundle
39+
/src/Symfony/Bundle/TwigBundle/ErrorRenderer/TwigHtmlErrorRenderer.php @yceruto
3640
# WebLink
3741
/src/Symfony/Component/WebLink/* @dunglas
3842
# Workflow

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
| Q | A
22
| ------------- | ---
3-
| Branch? | 4.4 for features / 3.4, 4.2 or 4.3 for bug fixes <!-- see below -->
3+
| Branch? | 4.4 for features / 3.4 or 4.3 for bug fixes <!-- see below -->
44
| Bug fix? | yes/no
55
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
6-
| BC breaks? | no <!-- see https://symfony.com/bc -->
76
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
8-
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
9-
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
7+
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", if any -->
108
| License | MIT
119
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
12-
1310
<!--
1411
Replace this notice by a short README for your feature/bugfix. This will help people
1512
understand your PR and can be used as a start for the documentation.
1613
1714
Additionally (see https://symfony.com/roadmap):
15+
- Always add tests and ensure they pass.
16+
- Never break backward compatibility (see https://symfony.com/bc).
1817
- Bug fixes must be submitted against the lowest maintained branch where they apply
19-
(lowest branches are regularly merged to upper ones so they get the fixes too).
18+
(lowest branches are regularly merged to upper ones so they get the fixes too.)
2019
- Features and deprecations must be submitted against branch 4.4.
2120
- Legacy code removals go to the master branch.
2221
-->

.github/build-packages.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
$packages = array();
1919
$flags = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
20+
$preferredInstall = json_decode(file_get_contents(__DIR__.'/composer-config.json'), true)['config']['preferred-install'];
2021

2122
foreach ($dirs as $k => $dir) {
2223
if (!system("git diff --name-only $mergeBase -- $dir", $exitStatus)) {
@@ -42,7 +43,12 @@
4243
$json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1);
4344
file_put_contents($dir.'/composer.json', $json);
4445
}
45-
passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *");
46+
47+
if (isset($preferredInstall[$package->name]) && 'source' === $preferredInstall[$package->name]) {
48+
passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *");
49+
} else {
50+
passthru("cd $dir && git init && git add . && git commit -m - && git archive -o package.tar HEAD && rm .git/ -Rf");
51+
}
4652

4753
if (!isset($package->extra->{'branch-alias'}->{'dev-master'})) {
4854
echo "Missing \"dev-master\" branch-alias in composer.json extra.\n";

.github/composer-config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"config": {
3+
"preferred-install": {
4+
"symfony/form": "source",
5+
"symfony/http-kernel": "source",
6+
"symfony/validator": "source",
7+
"*": "dist"
8+
}
9+
}
10+
}

.github/patch-types.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
3+
if (false === getenv('SYMFONY_PATCH_TYPE_DECLARATIONS')) {
4+
echo "Please define the SYMFONY_PATCH_TYPE_DECLARATIONS env var when running this script.\n";
5+
exit(1);
6+
}
7+
8+
require __DIR__.'/../.phpunit/phpunit-8.3-0/vendor/autoload.php';
9+
10+
file_put_contents(__DIR__.'/../vendor/autoload.php', preg_replace('/^return (Composer.*);/m', <<<'EOTXT'
11+
$loader = \1;
12+
$loader->addClassMap(['Symfony\Component\Debug\Exception\FlattenException' => \dirname(__DIR__).'/src/Symfony/Component/Debug/Exception/FlattenException.php']);
13+
14+
return $loader;
15+
16+
EOTXT
17+
, file_get_contents(__DIR__.'/../vendor/autoload.php')));
18+
19+
$loader = require __DIR__.'/../vendor/autoload.php';
20+
21+
Symfony\Component\ErrorHandler\DebugClassLoader::enable();
22+
23+
foreach ($loader->getClassMap() as $class => $file) {
24+
switch (true) {
25+
case false !== strpos(realpath($file), '/vendor/'):
26+
case false !== strpos($file, '/src/Symfony/Bridge/PhpUnit/'):
27+
case false !== strpos($file, '/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php'):
28+
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadParent.php'):
29+
case false !== strpos($file, '/src/Symfony/Component/Debug/Tests/Fixtures/'):
30+
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Compiler/OptionalServiceClass.php'):
31+
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ParentNotExists.php'):
32+
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/BadClasses/MissingParent.php'):
33+
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/'):
34+
case false !== strpos($file, '/src/Symfony/Component/ErrorHandler/Tests/Fixtures/'):
35+
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php'):
36+
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/ParentDummy.php'):
37+
case false !== strpos($file, '/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ObjectOuter.php'):
38+
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/NotLoadableClass.php'):
39+
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/Php74.php') && \PHP_VERSION_ID < 70400:
40+
continue 2;
41+
}
42+
43+
class_exists($class);
44+
}
45+
46+
Symfony\Component\ErrorHandler\DebugClassLoader::checkClasses();

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ vendor/
22
composer.lock
33
phpunit.xml
44
.php_cs.cache
5+
.phpunit.result.cache
56
composer.phar
67
package.tar
78
/packages.json

.php_cs.dist

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,46 @@ return PhpCsFixer\Config::create()
88
->setRules([
99
'@Symfony' => true,
1010
'@Symfony:risky' => true,
11-
'@PHPUnit48Migration:risky' => true,
12-
'php_unit_no_expectation_annotation' => false, // part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice
11+
'@PHPUnit75Migration:risky' => true,
12+
'php_unit_dedicate_assert' => ['target' => '5.6'],
13+
'phpdoc_no_empty_return' => false, // triggers almost always false positive
1314
'array_syntax' => ['syntax' => 'short'],
1415
'fopen_flags' => false,
1516
'ordered_imports' => true,
17+
'phpdoc_trim_consecutive_blank_line_separation' => true,
18+
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
1619
'protected_to_private' => false,
1720
// Part of @Symfony:risky in PHP-CS-Fixer 2.13.0. To be removed from the config file once upgrading
1821
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced', 'strict' => true],
1922
// Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading
2023
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
24+
'combine_nested_dirname' => true,
2125
])
2226
->setRiskyAllowed(true)
2327
->setFinder(
2428
PhpCsFixer\Finder::create()
2529
->in(__DIR__.'/src')
2630
->append([__FILE__])
31+
->notPath('#/Fixtures/#')
2732
->exclude([
28-
'Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/Fixtures',
2933
// directories containing files with content that is autogenerated by `var_export`, which breaks CS in output code
30-
'Symfony/Component/DependencyInjection/Tests/Fixtures',
31-
'Symfony/Component/Routing/Tests/Fixtures/dumper',
3234
// fixture templates
33-
'Symfony/Component/Templating/Tests/Fixtures/templates',
34-
'Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TemplatePathsCache',
3535
'Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom',
36-
// generated fixtures
37-
'Symfony/Component/VarDumper/Tests/Fixtures',
38-
'Symfony/Component/VarExporter/Tests/Fixtures',
3936
// resource templates
4037
'Symfony/Bundle/FrameworkBundle/Resources/views/Form',
4138
// explicit trigger_error tests
4239
'Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/',
4340
])
4441
// Support for older PHPunit version
4542
->notPath('Symfony/Bridge/PhpUnit/SymfonyTestsListener.php')
43+
->notPath('#Symfony/Bridge/PhpUnit/.*Mock\.php#')
44+
->notPath('#Symfony/Bridge/PhpUnit/.*Legacy#')
4645
// file content autogenerated by `var_export`
4746
->notPath('Symfony/Component/Translation/Tests/fixtures/resources.php')
4847
// test template
4948
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php')
50-
// explicit heredoc test
51-
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php')
5249
// explicit trigger_error tests
5350
->notPath('Symfony/Component/Debug/Tests/DebugClassLoaderTest.php')
54-
// invalid annotations on purpose
55-
->notPath('Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php')
51+
->notPath('Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php')
5652
)
5753
;

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