Skip to content

Commit cfcb1dc

Browse files
Merge branch '5.2' into 5.3
* 5.2: Use PHP_OS_FAMILY if possible Fix tests Fix minor typos [WebProfilerBundle] Fix the values of some CSS properties [Yaml] Fixed an exception message Fix ctype_digit deprecation Add a Special Case for Translating Choices in en_US_POSIX
2 parents 29f12c5 + a3646f7 commit cfcb1dc

File tree

14 files changed

+37
-22
lines changed

14 files changed

+37
-22
lines changed

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
if: "${{ matrix.php == '8.0' && ! matrix.mode }}"
140140
run: |
141141
sed -i 's/"\*\*\/Tests\/"//' composer.json
142-
composer install --optimize-autoloader
142+
composer install -q --optimize-autoloader
143143
SYMFONY_PATCH_TYPE_DECLARATIONS=force=1 php .github/patch-types.php
144144
SYMFONY_PATCH_TYPE_DECLARATIONS=force=1 php .github/patch-types.php # ensure the script is idempotent
145145
echo PHPUNIT="$PHPUNIT,legacy" >> $GITHUB_ENV

src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public function getDescribeCallableTestData()
209209
}
210210

211211
/** @dataProvider getClassDescriptionTestData */
212-
public function testGetClassDecription($object, $expectedDescription)
212+
public function testGetClassDescription($object, $expectedDescription)
213213
{
214214
$this->assertEquals($expectedDescription, $this->getDescriptor()->getClassDescription($object));
215215
}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.css.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.container {
2-
max-width: auto;
2+
max-width: none;
33
margin: 0;
44
padding: 0;
55
}
@@ -28,5 +28,5 @@
2828
}
2929

3030
.exception-message-wrapper .container {
31-
min-height: auto;
31+
min-height: unset;
3232
}

src/Symfony/Component/Console/Helper/SymfonyQuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected function writeError(OutputInterface $output, \Exception $error)
100100

101101
private function getEofShortcut(): string
102102
{
103-
if (false !== strpos(\PHP_OS, 'WIN')) {
103+
if ('Windows' === \PHP_OS_FAMILY) {
104104
return '<comment>Ctrl+Z</comment> then <comment>Enter</comment>';
105105
}
106106

src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,14 +1033,14 @@ public function testMaxSecondsBetweenRedraws()
10331033
$bar->setRedrawFrequency(4); // disable step based redraws
10341034
$bar->start();
10351035

1036-
$bar->setProgress(1); // No treshold hit, no redraw
1036+
$bar->setProgress(1); // No threshold hit, no redraw
10371037
$bar->maxSecondsBetweenRedraws(2);
10381038
sleep(1);
10391039
$bar->setProgress(2); // Still no redraw because it takes 2 seconds for a redraw
10401040
sleep(1);
10411041
$bar->setProgress(3); // 1+1 = 2 -> redraw finally
10421042
$bar->setProgress(4); // step based redraw freq hit, redraw even without sleep
1043-
$bar->setProgress(5); // No treshold hit, no redraw
1043+
$bar->setProgress(5); // No threshold hit, no redraw
10441044
$bar->maxSecondsBetweenRedraws(3);
10451045
sleep(2);
10461046
$bar->setProgress(6); // No redraw even though 2 seconds passed. Throttling has priority
@@ -1071,7 +1071,7 @@ public function testMinSecondsBetweenRedraws()
10711071
$bar->setProgress(3); // 1 second passed but we changed threshold, should not draw
10721072
sleep(1);
10731073
$bar->setProgress(4); // 1+1 seconds = 2 seconds passed which conforms threshold, draw
1074-
$bar->setProgress(5); // No treshold hit, no redraw
1074+
$bar->setProgress(5); // No threshold hit, no redraw
10751075

10761076
rewind($output->getStream());
10771077
$this->assertEquals(

src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public function testAskMultilineQuestionIncludesHelpText()
218218
{
219219
$expected = 'Write an essay (press Ctrl+D to continue)';
220220

221-
if (false !== strpos(\PHP_OS, 'WIN')) {
221+
if ('Windows' === \PHP_OS_FAMILY) {
222222
$expected = 'Write an essay (press Ctrl+Z then Enter to continue)';
223223
}
224224

src/Symfony/Component/ErrorHandler/DebugClassLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public function __construct(callable $classLoader)
208208
} elseif (substr($test, -\strlen($file)) === $file) {
209209
// filesystem is case insensitive and realpath() normalizes the case of characters
210210
self::$caseCheck = 1;
211-
} elseif (false !== stripos(\PHP_OS, 'darwin')) {
211+
} elseif ('Darwin' === \PHP_OS_FAMILY) {
212212
// on MacOSX, HFS+ is case insensitive but realpath() doesn't normalize the case of characters
213213
self::$caseCheck = 2;
214214
} else {

src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ public function testAmqpStampHeadersAreUsed()
614614
$connection->publish('body', ['Foo' => 'X'], 0, new AmqpStamp(null, \AMQP_NOPARAM, ['headers' => ['Bar' => 'Y']]));
615615
}
616616

617-
public function testAmqpStampDelireryModeIsUsed()
617+
public function testAmqpStampDeliveryModeIsUsed()
618618
{
619619
$factory = new TestAmqpFactory(
620620
$this->createMock(\AMQPConnection::class),

src/Symfony/Component/Messenger/Tests/EventListener/SendFailedMessageForRetryListenerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,12 @@ public function testEnvelopeKeepOnlyTheLast10Stamps()
177177
$senderLocator = $this->createMock(ContainerInterface::class);
178178
$senderLocator->expects($this->once())->method('has')->willReturn(true);
179179
$senderLocator->expects($this->once())->method('get')->willReturn($sender);
180-
$retryStategy = $this->createMock(RetryStrategyInterface::class);
181-
$retryStategy->expects($this->once())->method('isRetryable')->willReturn(true);
182-
$retryStategy->expects($this->once())->method('getWaitingTime')->willReturn(1000);
180+
$retryStrategy = $this->createMock(RetryStrategyInterface::class);
181+
$retryStrategy->expects($this->once())->method('isRetryable')->willReturn(true);
182+
$retryStrategy->expects($this->once())->method('getWaitingTime')->willReturn(1000);
183183
$retryStrategyLocator = $this->createMock(ContainerInterface::class);
184184
$retryStrategyLocator->expects($this->once())->method('has')->willReturn(true);
185-
$retryStrategyLocator->expects($this->once())->method('get')->willReturn($retryStategy);
185+
$retryStrategyLocator->expects($this->once())->method('get')->willReturn($retryStrategy);
186186

187187
$listener = new SendFailedMessageForRetryListener($senderLocator, $retryStrategyLocator);
188188

src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1988,7 +1988,7 @@ public function testPassConstraintToViolation()
19881988
$this->assertSame($constraint, $violations[0]->getConstraint());
19891989
}
19901990

1991-
public function testCollectionConstraitViolationHasCorrectContext()
1991+
public function testCollectionConstraintViolationHasCorrectContext()
19921992
{
19931993
$data = [
19941994
'foo' => 'fooValue',

0 commit comments

Comments
 (0)