Skip to content

Commit a2f0734

Browse files
Merge branch '4.4' into 5.1
* 4.4: minor cs fix [Config][TwigBundle] Fixed syntax error in config [DI] Fix Xdebug 3.0 detection Use php8 stable [Cache] fix checking for redis_sentinel support [Intl] Update the ICU data to 68.1 Remove unused @throws tags and handling of never thrown exceptions [PhpUnitBridge] Fix disabling DeprecationErrorHandler from phpunit configuration file
2 parents 3a9f73d + a7fcb0b commit a2f0734

File tree

550 files changed

+9258
-6807
lines changed

Some content is hidden

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

550 files changed

+9258
-6807
lines changed

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ matrix:
2626
env: deps=high
2727
- php: 7.4
2828
env: deps=low
29-
- php: 8.0snapshot
29+
- php: 8.0
3030
services: [memcached]
3131
fast_finish: true
32-
allow_failures:
33-
- php: 8.0snapshot
34-
services: [memcached]
3532

3633
cache:
3734
directories:

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@
147147
}
148148
}
149149

150+
if ('disabled' === $getEnvVar('SYMFONY_DEPRECATIONS_HELPER')) {
151+
putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
152+
}
153+
150154
$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar')
151155
|| ($COMPOSER = rtrim('\\' === \DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar 2> /dev/null`))
152156
|| ($COMPOSER = rtrim('\\' === \DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer`) : `which composer 2> /dev/null`))

src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private function addGlobalsSection(ArrayNodeDefinition $rootNode)
8282
->arrayNode('globals')
8383
->normalizeKeys(false)
8484
->useAttributeAsKey('key')
85-
->example(['foo' => '"@bar"', 'pi' => 3.14])
85+
->example(['foo' => '@bar', 'pi' => 3.14])
8686
->prototype('array')
8787
->normalizeKeys(false)
8888
->beforeNormalization()

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ public static function createConnection($dsn, array $options = [])
158158
throw new InvalidArgumentException(sprintf('Invalid Redis DSN: "%s".', $dsn));
159159
}
160160

161+
$params += $query + $options + self::$defaultConnectionOptions;
162+
161163
if (isset($params['redis_sentinel']) && !class_exists(\Predis\Client::class)) {
162164
throw new CacheException(sprintf('Redis Sentinel support requires the "predis/predis" package: "%s".', $dsn));
163165
}
164166

165-
$params += $query + $options + self::$defaultConnectionOptions;
166-
167167
if (null === $params['class'] && !isset($params['redis_sentinel']) && \extension_loaded('redis')) {
168168
$class = $params['redis_cluster'] ? \RedisCluster::class : (1 < \count($hosts) ? \RedisArray::class : \Redis::class);
169169
} else {

src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ private function writeNode(NodeInterface $node, NodeInterface $parentNode = null
130130

131131
// example
132132
if ($example && !\is_array($example)) {
133-
$comments[] = 'Example: '.$example;
133+
$comments[] = 'Example: '.Inline::dump($example);
134134
}
135135

136136
$default = '' != (string) $default ? ' '.$default : '';
@@ -166,7 +166,7 @@ private function writeNode(NodeInterface $node, NodeInterface $parentNode = null
166166

167167
$this->writeLine('# '.$message.':', $depth * 4 + 4);
168168

169-
$this->writeArray($example, $depth + 1);
169+
$this->writeArray(array_map([Inline::class, 'dump'], $example), $depth + 1);
170170
}
171171

172172
if ($children) {

src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function provideDumpAtPath()
4242
# this is a long
4343
# multi-line info text
4444
# which should be indented
45-
child3: ~ # Example: example setting
45+
child3: ~ # Example: 'example setting'
4646
EOL
4747
],
4848
'Regular nested' => ['array.child2', <<<EOL
@@ -112,7 +112,7 @@ enum: ~ # One of "this"; "that"
112112
# this is a long
113113
# multi-line info text
114114
# which should be indented
115-
child3: ~ # Example: example setting
115+
child3: ~ # Example: 'example setting'
116116
scalar_prototyped: []
117117
parameters:
118118

src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ public function __construct(string $serviceId, $message = '', int $code = 0, \Th
2323
{
2424
$this->serviceId = $serviceId;
2525

26-
if ($message instanceof \Closure && \function_exists('xdebug_is_enabled') && xdebug_is_enabled()) {
26+
if ($message instanceof \Closure
27+
&& (\function_exists('xdebug_is_enabled') ? xdebug_is_enabled() : \function_exists('xdebug_info'))
28+
) {
2729
$message = $message();
2830
}
2931

src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function testChoiceTranslationLocaleOption()
4949
// Don't check objects for identity
5050
$this->assertContainsEquals(new ChoiceView('en', 'en', 'англійська'), $choices);
5151
$this->assertContainsEquals(new ChoiceView('en_GB', 'en_GB', 'англійська (Велика Британія)'), $choices);
52-
$this->assertContainsEquals(new ChoiceView('zh_Hant_MO', 'zh_Hant_MO', 'китайська (традиційна, Макао, О.А.Р Китаю)'), $choices);
52+
$this->assertContainsEquals(new ChoiceView('zh_Hant_TW', 'zh_Hant_TW', 'китайська (традиційна, Тайвань)'), $choices);
5353
}
5454

5555
public function testSubmitNull($expected = null, $norm = null, $view = null)

src/Symfony/Component/HttpFoundation/JsonResponse.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ public function setCallback(string $callback = null)
135135
* Sets a raw string containing a JSON document to be sent.
136136
*
137137
* @return $this
138-
*
139-
* @throws \InvalidArgumentException
140138
*/
141139
public function setJson(string $json)
142140
{

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -510,15 +510,7 @@ public function __clone()
510510
*/
511511
public function __toString()
512512
{
513-
try {
514-
$content = $this->getContent();
515-
} catch (\LogicException $e) {
516-
if (\PHP_VERSION_ID >= 70400) {
517-
throw $e;
518-
}
519-
520-
return trigger_error($e, \E_USER_ERROR);
521-
}
513+
$content = $this->getContent();
522514

523515
$cookieHeader = '';
524516
$cookies = [];
@@ -583,8 +575,6 @@ public function overrideGlobals()
583575
*
584576
* @param array $proxies A list of trusted proxies, the string 'REMOTE_ADDR' will be replaced with $_SERVER['REMOTE_ADDR']
585577
* @param int $trustedHeaderSet A bit field of Request::HEADER_*, to set which headers to trust from your proxies
586-
*
587-
* @throws \InvalidArgumentException When $trustedHeaderSet is invalid
588578
*/
589579
public static function setTrustedProxies(array $proxies, int $trustedHeaderSet)
590580
{
@@ -1506,8 +1496,6 @@ public function getProtocolVersion()
15061496
* @param bool $asResource If true, a resource will be returned
15071497
*
15081498
* @return string|resource The request body content or a resource to read the body stream
1509-
*
1510-
* @throws \LogicException
15111499
*/
15121500
public function getContent(bool $asResource = false)
15131501
{

0 commit comments

Comments
 (0)