Skip to content

Failed tests with ICU 57 #19854

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

Closed
remicollet opened this issue Sep 5, 2016 · 3 comments
Closed

Failed tests with ICU 57 #19854

remicollet opened this issue Sep 5, 2016 · 3 comments

Comments

@remicollet
Copy link
Contributor

remicollet commented Sep 5, 2016

There were 3 failures:
1) Symfony\Component\Form\Tests\Extension\Core\DataTransformer\NumberToLocalizedStringTransformerTest::testTransformWithGrouping with data set #0 (1234.5, '1.234,5', 'de_AT')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-1.234,5
+1 234,5
/builddir/build/BUILDROOT/php-symfony-2.8.10-2.fc26.noarch/usr/share/php/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php:77
2) Symfony\Component\Form\Tests\Extension\Core\DataTransformer\NumberToLocalizedStringTransformerTest::testTransformWithGrouping with data set #1 (12345.912, '12.345,912', 'de_AT')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-12.345,912
+12 345,912
/builddir/build/BUILDROOT/php-symfony-2.8.10-2.fc26.noarch/usr/share/php/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php:77
3) Symfony\Component\Form\Tests\Extension\Core\DataTransformer\NumberToLocalizedStringTransformerTest::testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGroupSep
Failed asserting that exception of type "\Symfony\Component\Form\Exception\TransformationFailedException" is thrown.
ERRORS!
Tests: 3365, Assertions: 7536, Errors: 3, Failures: 3, Warnings: 1765, Skipped: 2, Incomplete: 12.

Strangely these tests fail with 2.8.10, not with 2.8.9.

@remicollet
Copy link
Contributor Author

Also

1) Symfony\Component\Form\Tests\Extension\Core\DataTransformer\IntegerToLocalizedStringTransformerTest::testReverseTransformWithGrouping
Symfony\Component\Form\Exception\TransformationFailedException: The number contains unrecognized characters: ",5"
/builddir/build/BUILDROOT/php-symfony-2.8.10-1.fc26.x86_64/usr/share/php/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php:228
/builddir/build/BUILDROOT/php-symfony-2.8.10-1.fc26.x86_64/usr/share/php/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php:43
/builddir/build/BUILDROOT/php-symfony-2.8.10-1.fc26.x86_64/usr/share/php/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php:118

@jakzal jakzal added Form Intl and removed Intl labels Sep 5, 2016
@jakzal
Copy link
Contributor

jakzal commented Sep 5, 2016

@remicollet thanks for reporting, I'll look into this

@jakzal
Copy link
Contributor

jakzal commented Sep 5, 2016

ICU data was indeed changed for de_AT. It is taken from cldr though, which also has this bit changed. So it looks like it's a bug in CLDR (unless Austria really got rid of the period as a grouping separator).

php -r '$f=new NumberFormatter("de_AT", NumberFormatter::DECIMAL); var_dump($f->getSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL));
'
string(2) " "

fabpot added a commit that referenced this issue Sep 5, 2016
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fix intl related failures

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19854
| License       | MIT
| Doc PR        | -

Commits
-------

aa3c66e [Form] Fix transformer tests after the ICU update
@fabpot fabpot closed this as completed Sep 5, 2016
fabpot added a commit that referenced this issue Oct 10, 2017
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] fix parsing invalid floating point numbers

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19854, #22586
| License       | MIT
| Doc PR        |

Should make AppVeyor builds pass again. Code borrowed from `NumberToLocalizedStringTransformer`.

Commits
-------

042eac4 [Form] fix parsing invalid floating point numbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants