-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add php 7 to travis #1858
Add php 7 to travis #1858
Conversation
We have automated a Magento Contributor License Agreement verifier for contributions sent to our GitHub projects. |
Please merge this PR :-) |
@@ -2,6 +2,8 @@ language: php | |||
php: | |||
- 5.5 | |||
- 5.6 | |||
- 7.0 | |||
- hhvm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any test results produced by hhvm jobs, here is the example of such: https://travis-ci.org/Sanuch/magento2/builds/47961569
You can take needed changes from @Sanuch fork or remove hhvm occurrences from this PR.
Very nice to see PHP7 jobs workable on Travis CI at last 👍 |
Did some cleanup and rework of this pr |
@dimitri-koenig Looking at the Travis CI report there are only 3 failures on the PHP 7 build, specifically unit tests verifying PHP readiness checks. They are failing on something related to the |
I really prefer to delegate this to a separate issue and so merge and close this pull request. One small change after another. Deal? :-) |
@davidalger Could you still merge this pull request? |
The github community team doesn't do merges, that is up to the core team. I think the chances for a merge would be greatly improved if the tests where all passing. |
@dimitri-koenig - I think it's just a simple matter of changing the expected arrays depending on the version of PHP and/or Hack lang, because some array keys in the PHP readiness check will be missing in PHP7/Hack: link. So, in $expected = [
'responseType' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS,
'data' => [
'always_populate_raw_post_data' => [
'message' => $rawPostMessage,
'helpUrl' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data',
'error' => false
]
]
]; you'd do something like /**
* @return bool
*/
private function isPhp7OrHackLang()
{
return version_compare(PHP_VERSION, '7.0.0-beta') >= 0 || defined('HHVM_VERSION');
}
// ...
$expected = [ 'responseType' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS ];
if (!$this->isPhp7OrHackLang()) {
$expected['data'] = [
'always_populate_raw_post_data' => [
'message' => $rawPostMessage,
'helpUrl' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data',
'error' => false
];
} You'd have to do this 3 times, in the same class - |
@adragus-inviqa Thanks for that. I implemented it in a branch on my own fork (see 7bca51c6ab). They still pass on 5.5 and 5.6 but give another strange error under PHP 5.7. Don't have time to try and solve it this week…but maybe next. If I do, and this PR isn't updated, I'll just submit one with the new changes included. If you've got suggestions, I'll take 'em too :)
You can see the failing tests with new error messages here: https://travis-ci.org/davidalger/magento2/jobs/93043185 |
Yeah, that's a head scratcher. Not sure what could've changed in 5.7, as that |
@adragus-inviqa That link helped a bunch. There was a mock being setup within a method each of these tests called, but the mock isn't used when running PHP 7. Changed that and the tests all passed! I'm going to submit a PR with the entire set of changes now. |
I reworked the travis config to make it all work. At least most of the time the tests run through, so the config is working.
The next step would be to fix failing tests and its source code.