diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index b943c35ad56f7..cb96661790569 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -1856,7 +1856,7 @@ public function testClosureProxy() { $container = new ContainerBuilder(); $container->register('closure_proxy', SingleMethodInterface::class) - ->setPublic('true') + ->setPublic(true) ->setFactory(['Closure', 'fromCallable']) ->setArguments([[new Reference('foo'), 'cloneFoo']]) ->setLazy(true); @@ -1878,12 +1878,12 @@ public function testClosure() { $container = new ContainerBuilder(); $container->register('closure', 'Closure') - ->setPublic('true') + ->setPublic(true) ->setFactory(['Closure', 'fromCallable']) ->setArguments([new Reference('bar')]); $container->register('bar', 'stdClass'); $container->register('closure_of_service_closure', 'Closure') - ->setPublic('true') + ->setPublic(true) ->setFactory(['Closure', 'fromCallable']) ->setArguments([new ServiceClosureArgument(new Reference('bar2'))]); $container->register('bar2', 'stdClass'); @@ -1897,15 +1897,15 @@ public function testAutowireClosure() { $container = new ContainerBuilder(); $container->register('foo', Foo::class) - ->setPublic('true'); + ->setPublic(true); $container->register('my_callable', MyCallable::class) - ->setPublic('true'); + ->setPublic(true); $container->register('baz', \Closure::class) ->setFactory(['Closure', 'fromCallable']) ->setArguments(['var_dump']) - ->setPublic('true'); + ->setPublic(true); $container->register('bar', LazyClosureConsumer::class) - ->setPublic('true') + ->setPublic(true) ->setAutowired(true); $container->compile(); $dumper = new PhpDumper($container); @@ -1931,12 +1931,12 @@ public function testLazyClosure() { $container = new ContainerBuilder(); $container->register('closure1', 'Closure') - ->setPublic('true') + ->setPublic(true) ->setFactory(['Closure', 'fromCallable']) ->setLazy(true) ->setArguments([[new Reference('foo'), 'cloneFoo']]); $container->register('closure2', 'Closure') - ->setPublic('true') + ->setPublic(true) ->setFactory(['Closure', 'fromCallable']) ->setLazy(true) ->setArguments([[new Reference('foo_void'), '__invoke']]); @@ -1970,10 +1970,10 @@ public function testLazyAutowireAttribute() { $container = new ContainerBuilder(); $container->register('foo', Foo::class) - ->setPublic('true'); + ->setPublic(true); $container->setAlias(Foo::class, 'foo'); $container->register('bar', LazyServiceConsumer::class) - ->setPublic('true') + ->setPublic(true) ->setAutowired(true); $container->compile(); $dumper = new PhpDumper($container); @@ -1993,7 +1993,7 @@ public function testLazyAutowireAttributeWithIntersection() { $container = new ContainerBuilder(); $container->register('foo', AAndIInterfaceConsumer::class) - ->setPublic('true') + ->setPublic(true) ->setAutowired(true); $container->compile(); @@ -2017,7 +2017,7 @@ public function testCallableAdapterConsumer() $container = new ContainerBuilder(); $container->register('foo', Foo::class); $container->register('bar', CallableAdapterConsumer::class) - ->setPublic('true') + ->setPublic(true) ->setAutowired(true); $container->compile(); $dumper = new PhpDumper($container); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php index 513224574a891..92443e2011f27 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php @@ -95,7 +95,7 @@ public function testTransformWithRounding($input, $output, $roundingMode) public function testReverseTransform() { // Since we test against "de_AT", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -115,7 +115,7 @@ public function testReverseTransformEmpty() public function testReverseTransformWithGrouping() { // Since we test against "de_DE", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_DE'); @@ -210,7 +210,7 @@ public function testReverseTransformExpectsValidNumber() public function testReverseTransformExpectsInteger($number, $locale) { $this->expectException(TransformationFailedException::class); - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault($locale); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php index f25d49981cd3d..fe54d34cd4c6f 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php @@ -36,7 +36,7 @@ protected function tearDown(): void public function testTransform() { // Since we test against "de_AT", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -71,7 +71,7 @@ public function testTransformEmpty() public function testReverseTransform() { // Since we test against "de_AT", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -99,7 +99,7 @@ public function testReverseTransformEmpty() public function testFloatToIntConversionMismatchOnReverseTransform() { $transformer = new MoneyToLocalizedStringTransformer(null, null, null, 100); - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $this->assertSame(3655, (int) $transformer->reverseTransform('36,55')); @@ -108,7 +108,7 @@ public function testFloatToIntConversionMismatchOnReverseTransform() public function testFloatToIntConversionMismatchOnTransform() { $transformer = new MoneyToLocalizedStringTransformer(null, null, \NumberFormatter::ROUND_DOWN, 100); - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $this->assertSame('10,20', $transformer->transform(1020)); @@ -120,7 +120,7 @@ public function testValidNumericValuesWithNonDotDecimalPointCharacter() setlocale(\LC_ALL, 'de_AT.UTF-8'); $transformer = new MoneyToLocalizedStringTransformer(4, null, null, 100); - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); $this->assertSame('0,0035', $transformer->transform(12 / 34)); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php index fbb1030457ce3..5b1dd13c37d73 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php @@ -65,7 +65,7 @@ public static function provideTransformations() public function testTransform($from, $to, $locale) { // Since we test against other locales, we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault($locale); @@ -91,7 +91,7 @@ public static function provideTransformationsWithGrouping() public function testTransformWithGrouping($from, $to, $locale) { // Since we test against other locales, we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault($locale); @@ -103,7 +103,7 @@ public function testTransformWithGrouping($from, $to, $locale) public function testTransformWithScale() { // Since we test against "de_AT", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -208,7 +208,7 @@ public static function transformWithRoundingProvider() public function testTransformWithRounding($scale, $input, $output, $roundingMode) { // Since we test against "de_AT", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -220,7 +220,7 @@ public function testTransformWithRounding($scale, $input, $output, $roundingMode public function testTransformDoesNotRoundIfNoScale() { // Since we test against "de_AT", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -235,7 +235,7 @@ public function testTransformDoesNotRoundIfNoScale() public function testReverseTransform($to, $from, $locale) { // Since we test against other locales, we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault($locale); @@ -265,7 +265,7 @@ public function testReverseTransformWithGrouping($to, $from, $locale) public function testReverseTransformWithGroupingAndFixedSpaces() { // Since we test against other locales, we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('ru'); @@ -277,7 +277,7 @@ public function testReverseTransformWithGroupingAndFixedSpaces() public function testReverseTransformWithGroupingButWithoutGroupSeparator() { // Since we test against "de_AT", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -442,7 +442,7 @@ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGro public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupingUsed() { // Since we test against other locales, we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('fr'); $transformer = new NumberToLocalizedStringTransformer(); @@ -588,7 +588,7 @@ public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte() $this->expectException(TransformationFailedException::class); $this->expectExceptionMessage('The number contains unrecognized characters: "foo8"'); // Since we test against other locales, we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('ru'); @@ -602,7 +602,7 @@ public function testReverseTransformIgnoresTrailingSpacesInExceptionMessage() $this->expectException(TransformationFailedException::class); $this->expectExceptionMessage('The number contains unrecognized characters: "foo8"'); // Since we test against other locales, we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('ru'); @@ -625,7 +625,7 @@ public function testReverseTransformDisallowsTrailingExtraCharactersMultibyte() $this->expectException(TransformationFailedException::class); $this->expectExceptionMessage('The number contains unrecognized characters: "foo"'); // Since we test against other locales, we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('ru'); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php index 187017396034f..f0c4007972005 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php @@ -75,7 +75,7 @@ public function testTransformWithInteger() public function testTransformWithScale() { // Since we test against "de_AT", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -224,7 +224,7 @@ public function testReverseTransformWithInteger() public function testReverseTransformWithScale() { // Since we test against "de_AT", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -296,7 +296,7 @@ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGro public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupingUsed() { // Since we test against other locales, we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('fr'); $transformer = new PercentToLocalizedStringTransformer(1, 'integer', \NumberFormatter::ROUND_HALFUP); @@ -375,7 +375,7 @@ public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte() $this->expectException(TransformationFailedException::class); $this->expectExceptionMessage('The number contains unrecognized characters: "foo8"'); // Since we test against other locales, we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('ru'); @@ -401,7 +401,7 @@ public function testReverseTransformDisallowsTrailingExtraCharactersMultibyte() $this->expectException(TransformationFailedException::class); $this->expectExceptionMessage('The number contains unrecognized characters: "foo"'); // Since we test against other locales, we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('ru'); @@ -415,7 +415,7 @@ public function testTransformForHtml5Format() $transformer = new PercentToLocalizedStringTransformer(null, null, \NumberFormatter::ROUND_HALFUP, true); // Since we test against "de_CH", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_CH'); @@ -429,7 +429,7 @@ public function testTransformForHtml5FormatWithInteger() $transformer = new PercentToLocalizedStringTransformer(null, 'integer', \NumberFormatter::ROUND_HALFUP, true); // Since we test against "de_CH", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_CH'); @@ -440,7 +440,7 @@ public function testTransformForHtml5FormatWithInteger() public function testTransformForHtml5FormatWithScale() { // Since we test against "de_CH", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_CH'); @@ -452,7 +452,7 @@ public function testTransformForHtml5FormatWithScale() public function testReverseTransformForHtml5Format() { // Since we test against "de_CH", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_CH'); @@ -466,7 +466,7 @@ public function testReverseTransformForHtml5Format() public function testReverseTransformForHtml5FormatWithInteger() { // Since we test against "de_CH", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_CH'); @@ -481,7 +481,7 @@ public function testReverseTransformForHtml5FormatWithInteger() public function testReverseTransformForHtml5FormatWithScale() { // Since we test against "de_CH", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_CH'); @@ -546,7 +546,7 @@ class PercentToLocalizedStringTransformerWithoutGrouping extends PercentToLocali protected function getNumberFormatter(): \NumberFormatter { $formatter = new \NumberFormatter(\Locale::getDefault(), \NumberFormatter::DECIMAL); - $formatter->setAttribute(\NumberFormatter::GROUPING_USED, false); + $formatter->setAttribute(\NumberFormatter::GROUPING_USED, 0); return $formatter; } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php index 1be26c34d664f..56f9a737b9b21 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php @@ -93,7 +93,7 @@ public function testSubmitFromSingleTextDateTimeWithCustomFormat() public function testSubmitFromSingleTextDateTime() { // we test against "de_DE", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); if (\in_array(Intl::getIcuVersion(), ['71.1', '72.1'], true)) { $this->markTestSkipped('Skipping test due to a bug in ICU 71.1/72.1.'); @@ -119,7 +119,7 @@ public function testSubmitFromSingleTextDateTime() public function testSubmitFromSingleTextDateTimeImmutable() { // we test against "de_DE", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); if (\in_array(Intl::getIcuVersion(), ['71.1', '72.1'], true)) { $this->markTestSkipped('Skipping test due to a bug in ICU 71.1/72.1.'); @@ -146,7 +146,7 @@ public function testSubmitFromSingleTextDateTimeImmutable() public function testSubmitFromSingleTextString() { // we test against "de_DE", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); if (\in_array(Intl::getIcuVersion(), ['71.1', '72.1'], true)) { $this->markTestSkipped('Skipping test due to a bug in ICU 71.1/72.1.'); @@ -172,7 +172,7 @@ public function testSubmitFromSingleTextString() public function testSubmitFromSingleTextTimestamp() { // we test against "de_DE", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); if (\in_array(Intl::getIcuVersion(), ['71.1', '72.1'], true)) { $this->markTestSkipped('Skipping test due to a bug in ICU 71.1/72.1.'); @@ -200,7 +200,7 @@ public function testSubmitFromSingleTextTimestamp() public function testSubmitFromSingleTextRaw() { // we test against "de_DE", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); if (\in_array(Intl::getIcuVersion(), ['71.1', '72.1'], true)) { $this->markTestSkipped('Skipping test due to a bug in ICU 71.1/72.1.'); @@ -232,7 +232,7 @@ public function testSubmitFromSingleTextRaw() public function testArrayDateWithReferenceDoesUseReferenceTimeOnZero() { // we test against "de_DE", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_DE'); @@ -505,7 +505,7 @@ public function testThrowExceptionIfDaysIsInvalid() public function testSetDataWithNegativeTimezoneOffsetStringInput() { // we test against "de_DE", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_DE'); @@ -528,7 +528,7 @@ public function testSetDataWithNegativeTimezoneOffsetStringInput() public function testSetDataWithNegativeTimezoneOffsetDateTimeInput() { // we test against "de_DE", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_DE'); @@ -607,7 +607,7 @@ public function testMonthsOptionShortFormat() public function testMonthsOptionLongFormat() { // we test against "de_AT", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -627,7 +627,7 @@ public function testMonthsOptionLongFormat() public function testMonthsOptionLongFormatWithDifferentTimezone() { // we test against "de_AT", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -713,7 +713,7 @@ public function testIsSynchronizedReturnsFalseIfChoiceAndDayEmpty() public function testPassDatePatternToView() { // we test against "de_AT", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -726,7 +726,7 @@ public function testPassDatePatternToView() public function testPassDatePatternToViewDifferentFormat() { // we test against "de_AT", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_AT'); @@ -774,7 +774,7 @@ public function testDontPassDatePatternIfText() public function testDatePatternFormatWithQuotedStrings() { // we test against "es_ES", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('es_ES'); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php index b00439b574153..6d5521f0e83f2 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php @@ -23,7 +23,7 @@ protected function setUp(): void { // we test against different locales, so we need the full // implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); parent::setUp(); @@ -76,7 +76,7 @@ public function testSubmitNull($expected = null, $norm = null, $view = null) public function testMoneyPatternWithoutCurrency() { - $view = $this->factory->create(static::TESTED_TYPE, null, ['currency' => false]) + $view = $this->factory->create(static::TESTED_TYPE, null, ['currency' => null]) ->createView(); $this->assertSame('{{ widget }}', $view->vars['money_pattern']); @@ -113,7 +113,7 @@ public function testDefaultFormattingWithSpecifiedRounding() public function testHtml5EnablesSpecificFormatting() { // Since we test against "de_CH", we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('de_CH'); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php index 9efe052219722..132f35e4cbd26 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php @@ -26,7 +26,7 @@ protected function setUp(): void parent::setUp(); // we test against "de_DE", so we need the full implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); $this->defaultLocale = \Locale::getDefault(); \Locale::setDefault('de_DE'); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/PercentTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/PercentTypeTest.php index 76595d79be367..f6e713c56b440 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/PercentTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/PercentTypeTest.php @@ -25,7 +25,7 @@ protected function setUp(): void { // we test against different locales, so we need the full // implementation - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); parent::setUp(); diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php index 3e1654247b4b4..8babfe4a7d287 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php @@ -33,7 +33,7 @@ public function testCollectWithUnexpectedFormat() $c = new LoggerDataCollector($logger, __DIR__.'/'); $c->lateCollect(); - $compilerLogs = $c->getCompilerLogs()->getValue('message'); + $compilerLogs = $c->getCompilerLogs()->getValue(true); $this->assertSame([ ['message' => 'Removed service "Psr\Container\ContainerInterface"; reason: private alias.'], diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php index f121322bb597e..62d0cde969795 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php @@ -505,7 +505,7 @@ public function testAutowireAttribute() $this->assertInstanceOf(\stdClass::class, $locator->get('serviceAsValue')); $this->assertInstanceOf(\stdClass::class, $locator->get('expressionAsValue')); $this->assertSame('bar', $locator->get('rawValue')); - $this->stringContains('Symfony_Component_HttpKernel_Tests_Fixtures_Suit_APP_SUIT', $locator->get('suit')); + $this->assertStringContainsString('Symfony_Component_HttpKernel_Tests_Fixtures_Suit_APP_SUIT', $locator->get('suit')); $this->assertSame('@bar', $locator->get('escapedRawValue')); $this->assertSame('foo', $locator->get('customAutowire')); $this->assertInstanceOf(FooInterface::class, $autowireCallable = $locator->get('autowireCallable')); diff --git a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php index a0e5f9f7958d9..a9f3aaf30562a 100644 --- a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php +++ b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php @@ -1368,7 +1368,6 @@ public function testNormalizerCanAccessOtherOptions() $this->resolver->setDefault('norm', 'baz'); $this->resolver->setNormalizer('norm', function (Options $options) { - /** @var TestCase $test */ Assert::assertSame('bar', $options['default']); return 'normalized'; @@ -1386,8 +1385,7 @@ public function testNormalizerCanAccessLazyOptions() $this->resolver->setDefault('norm', 'baz'); $this->resolver->setNormalizer('norm', function (Options $options) { - /** @var TestCase $test */ - Assert::assertEquals('bar', $options['lazy']); + Assert::assertSame('bar', $options['lazy']); return 'normalized'; }); @@ -2417,9 +2415,9 @@ public function testResolveOptionsDefinedByOptionConfigurator() ; $introspector = new OptionsResolverIntrospector($this->resolver); - $this->assertTrue(true, $this->resolver->isDefined('foo')); - $this->assertTrue(true, $this->resolver->isDeprecated('foo')); - $this->assertTrue(true, $this->resolver->hasDefault('foo')); + $this->assertTrue($this->resolver->isDefined('foo')); + $this->assertTrue($this->resolver->isDeprecated('foo')); + $this->assertTrue($this->resolver->hasDefault('foo')); $this->assertSame('bar', $introspector->getDefault('foo')); $this->assertSame(['string', 'bool'], $introspector->getAllowedTypes('foo')); $this->assertSame(['bar', 'zab'], $introspector->getAllowedValues('foo')); diff --git a/src/Symfony/Component/Process/Pipes/AbstractPipes.php b/src/Symfony/Component/Process/Pipes/AbstractPipes.php index 51a566f3bf5f9..19eea16f3e4ca 100644 --- a/src/Symfony/Component/Process/Pipes/AbstractPipes.php +++ b/src/Symfony/Component/Process/Pipes/AbstractPipes.php @@ -72,10 +72,10 @@ protected function unblock(): void } foreach ($this->pipes as $pipe) { - stream_set_blocking($pipe, 0); + stream_set_blocking($pipe, false); } if (\is_resource($this->input)) { - stream_set_blocking($this->input, 0); + stream_set_blocking($this->input, false); } $this->blocked = false; @@ -97,7 +97,7 @@ protected function write(): ?array if (!$input->valid()) { $input = null; } elseif (\is_resource($input = $input->current())) { - stream_set_blocking($input, 0); + stream_set_blocking($input, false); } elseif (!isset($this->inputBuffer[0])) { if (!\is_string($input)) { if (!\is_scalar($input)) { diff --git a/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php b/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php index 09124a4b966bc..fa0901e265348 100644 --- a/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php +++ b/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php @@ -17,9 +17,9 @@ $read = [\STDIN]; $write = [\STDOUT, \STDERR]; -stream_set_blocking(\STDIN, 0); -stream_set_blocking(\STDOUT, 0); -stream_set_blocking(\STDERR, 0); +stream_set_blocking(\STDIN, false); +stream_set_blocking(\STDOUT, false); +stream_set_blocking(\STDERR, false); $out = $err = ''; while ($read || $write) { diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php index 524d0bc540d2b..4be3789269e53 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php @@ -169,7 +169,7 @@ public function testInvalidAlpha3CountryNamed() public function testValidateUsingCountrySpecificLocale() { // in order to test with "en_GB" - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('en_GB'); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php index a0e16ec145fb4..d63c5ab995564 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php @@ -75,7 +75,7 @@ public function testValidCurrencies($currency) **/ public function testValidCurrenciesWithCountrySpecificLocale($currency) { - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('en_GB'); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php index 9abb9cfc4ecc7..5752430804b84 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php @@ -167,7 +167,7 @@ public function testInvalidAlpha3LanguageNamed() public function testValidateUsingCountrySpecificLocale() { - IntlTestHelper::requireFullIntl($this, false); + IntlTestHelper::requireFullIntl($this); \Locale::setDefault('fr_FR'); $existingLanguage = 'en';