Skip to content

[Console] don't rely on internal sort implementation om test #15940

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
Sep 27, 2015

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Sep 27, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #14894
License MIT
Doc PR

PHP does not guarantuee how array elements with the same value will be
sorted when applying asort(). Since all namespaces used in the test
produce the same Levenshtein value, we should only check for presence of
these namespaces instead of comparing the exact order.

@xabbuh
Copy link
Member Author

xabbuh commented Sep 27, 2015

The builds were failing on HHVM and PHP7. Explanations can be found on https://bugs.php.net/bug.php?id=70289, php/php-src#999 and facebook/hhvm#4649.

@fabpot
Copy link
Member

fabpot commented Sep 27, 2015

👍

PHP does not guarantuee how array elements with the same value will be
sorted when applying `asort()`. Since all namespaces used in the test
produce the same Levenshtein value, we should only check for presence of
these namespaces instead of comparing the exact order.
@jakzal
Copy link
Contributor

jakzal commented Sep 27, 2015

👍

@xabbuh
Copy link
Member Author

xabbuh commented Sep 27, 2015

The Travis failures are not related to this PR.

@fabpot
Copy link
Member

fabpot commented Sep 27, 2015

Thank you @xabbuh.

@fabpot fabpot merged commit 3011fa0 into symfony:2.8 Sep 27, 2015
fabpot added a commit that referenced this pull request Sep 27, 2015
…test (xabbuh)

This PR was merged into the 2.8 branch.

Discussion
----------

[Console] don't rely on internal sort implementation om test

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

PHP does not guarantuee how array elements with the same value will be
sorted when applying `asort()`. Since all namespaces used in the test
produce the same Levenshtein value, we should only check for presence of
these namespaces instead of comparing the exact order.

Commits
-------

3011fa0 don't rely on internal sort implementation in test
@xabbuh xabbuh deleted the alternatives-order-test branch September 27, 2015 14:58
@GromNaN
Copy link
Member

GromNaN commented Sep 27, 2015

Thanks @xabbuh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants