Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Security] skip bcrypt tests on incompatible platforms #17073

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 2 commits into from
Dec 22, 2015

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Dec 19, 2015

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

Not all PHP versions before 5.3.7 have backported fixes that make it
possible to use password_hash() function. Therefore, we have to skip
tests on not supported platforms.

@xabbuh
Copy link
Member Author

xabbuh commented Dec 19, 2015

This should make tests on Appveyor pass again.

@jakzal
Copy link
Contributor

jakzal commented Dec 19, 2015

👍

Not all PHP versions before 5.3.7 have backported fixes that make it
possible to use `password_hash()` function. Therefore, we have to skip
tests on not supported platforms.
@nicolas-grekas
Copy link
Member

I really prefer the annotation, we don't care about patched php versions, this is a test suite, not a framework :-)

@xabbuh
Copy link
Member Author

xabbuh commented Dec 19, 2015

Well, I think it's good to be able to run the tests on PHP 5.3 on Travis when we claim compatibility with that PHP version.

@wouterj
Copy link
Member

wouterj commented Dec 19, 2015

👍

This allows to run the tests on Travis's lowest test jobs (as travis has a compatible PHP patch), but makes Appveyor pass as well.

@nicolas-grekas
Copy link
Member

Travis runs a higher version than 5.3.7 isn't it?

@xabbuh
Copy link
Member Author

xabbuh commented Dec 19, 2015

@nicolas-grekas We define MIN_PHP to be 5.3.3 but we indeed don't seem to run tests with that version. Is that intended?

@nicolas-grekas
Copy link
Member

@xabbuh yep it is: the travis matrix is big enough, lowest php versions are run on appveyor

@xabbuh
Copy link
Member Author

xabbuh commented Dec 19, 2015

@nicolas-grekas So we should remove the variable from the Travis config?

Anyway, I would keep the test this way as the tests would then be executed on Appveyor if they ever used backported fixes in their PHP versions.

@nicolas-grekas
Copy link
Member

As you can read in the travis file, the var is actually used for testing the process component with --enable-sigchild, so we should keep it

@nicolas-grekas
Copy link
Member

@xabbuh ok to revert to the annotated version? Adding this method + conditional branching adds cyclomatic complexity for a case that our test matrix never reaches and is not required to reach (because we don't test the native implementation but our php wrapper, which wouldn't be better covered by going to this corner case)

@xabbuh
Copy link
Member Author

xabbuh commented Dec 22, 2015

@nicolas-grekas I don't have too hard feelings about this. So I reverted to use the @requires annotation here again.

@nicolas-grekas
Copy link
Member

👍

@xabbuh
Copy link
Member Author

xabbuh commented Dec 22, 2015

Everything's finally green again.

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit 2a6fa7b into symfony:2.3 Dec 22, 2015
nicolas-grekas added a commit that referenced this pull request Dec 22, 2015
…Christian Flothmann, xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[Security] skip bcrypt tests on incompatible platforms

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

Not all PHP versions before 5.3.7 have backported fixes that make it
possible to use `password_hash()` function. Therefore, we have to skip
tests on not supported platforms.

Commits
-------

2a6fa7b use requires annotation
65eb188 skip bcrypt tests on incompatible platforms
@xabbuh xabbuh deleted the pr-17055 branch December 22, 2015 12:09
Tobion added a commit that referenced this pull request Dec 24, 2015
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Run tests on all PHP versions

Symfony 2.7 supports PHP >= 5.3.9. Since #17073 was merged to 2.7 now, we need to remove the checks for 5.3.7 again.

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

Commits
-------

4bec980 [Security] Run tests on all PHP versions
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