Skip to content

Fix wrong boolean values #61296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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');
Expand All @@ -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);
Expand All @@ -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']]);
Expand Down Expand Up @@ -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);
Expand All @@ -1993,7 +1993,7 @@ public function testLazyAutowireAttributeWithIntersection()
{
$container = new ContainerBuilder();
$container->register('foo', AAndIInterfaceConsumer::class)
->setPublic('true')
->setPublic(true)
->setAutowired(true);

$container->compile();
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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');

Expand Down Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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');

Expand Down Expand Up @@ -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'));
Expand All @@ -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));
Expand All @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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');

Expand Down Expand Up @@ -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');

Expand All @@ -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');

Expand All @@ -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);

Expand Down Expand Up @@ -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');

Expand All @@ -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');

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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');

Expand All @@ -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');

Expand All @@ -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');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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');

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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');

Expand All @@ -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');

Expand All @@ -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');

Expand All @@ -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');

Expand All @@ -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');

Expand All @@ -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');

Expand All @@ -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');

Expand All @@ -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');

Expand Down Expand Up @@ -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;
}
Expand Down
Loading
Loading