8000 Merge branch '5.4' into 6.0 · symfony/symfony@f0aef59 · GitHub
[go: up one dir, main page]

Skip to content

Commit f0aef59

Browse files
Merge branch '5.4' into 6.0
* 5.4: Use PHP_OS_FAMILY if possible Fix tests Fix typos in error messages Fix minor typos [WebProfilerBundle] Fix the values of some CSS properties [Messenger] Fixed an exception message [Yaml] Fixed an exception message Fix ctype_digit deprecation Add a Special Case for Translating Choices in en_US_POSIX
2 parents 08c5bbf + 88c6a3a commit f0aef59

File tree

14 files changed

+38
-23
lines changed

14 files changed

+38
-23
lines changed

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< 97AE /td>-
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
@@ -203,7 +203,7 @@ public function __construct(callable $classLoader)
203203
} elseif (substr($test, -\strlen($file)) === $file) {
204204
// filesystem is case insensitive and realpath() normalizes the case of characters
205205
self::$caseCheck = 1;
206-
} elseif (false !== stripos(\PHP_OS, 'darwin')) {
206+
} elseif ('Darwin' === \PHP_OS_FAMILY) {
207207
// on MacOSX, HFS+ is case insensitive but realpath() doesn't normalize the case of characters
208208
self::$caseCheck = 2;
209209
} else {

src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function setup(): void
273273
}
274274

275275
if (null !== $this->configuration['account']) {
276-
throw new InvalidArgumentException(sprintf('The Amazon SQS queue "%s" does not exists (or you don\'t have permissions on it), and can\'t be created when an account is provided.', $this->configuration['queue_name']));
276+
throw new InvalidArgumentException(sprintf('The Amazon SQS queue "%s" does not exist (or you don\'t have permissions on it), and can\'t be created when an account is provided.', $this->configuration['queue_name']));
277277
}
278278

279279
$parameters = ['QueueName' => $this->configuration['queue_name']];
@@ -289,7 +289,7 @@ public function setup(): void
289289
// Blocking call to wait for the queue to be created
290290
$exists->wait();
291291
if (!$exists->isSuccess()) {
292-
throw new TransportException(sprintf('Failed to crate the Amazon SQS queue "%s".', $this->configuration['queue_name']));
292+
throw new TransportException(sprintf('Failed to create the Amazon SQS queue "%s".', $this->configuration['queue_name']));
293293
}
294294
$this->queueUrl = null;
295295
}

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

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

583-
public function testAmqpStampDelireryModeIsUsed()
583+
public function testAmqpStampDeliveryModeIsUsed()
584584
{
585585
$factory = new TestAmqpFactory(
586586
$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
@@ -1982,7 +1982,7 @@ public function testPassConstraintToViolation()
19821982
$this->assertSame($constraint, $violations[0]->getConstraint());
19831983
}
19841984

1985-
public function testCollectionConstraitViolationHasCorrectContext()
1985+
public function testCollectionConstraintViolationHasCorrectContext()
19861986
{
19871987
$data = [
19881988
'foo' => 'fooValue',

0 commit comments

Comments
 (0)
0