-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Yaml] Fix 7.1 compat #20291
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
[Yaml] Fix 7.1 compat #20291
Conversation
ff7f408
to
89b78f2
Compare
This PR was merged into the 3.1 branch. Discussion ---------- [Yaml] Fix 7.1 compat | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Should make CI green again with PHP 7.1 RC4. Commits ------- 89b78f2 [Yaml] Fix 7.1 compat
@@ -507,17 +507,17 @@ public function testParseTimestampAsDateTimeObject($yaml, $year, $month, $day, $ | |||
$expected = new \DateTime($yaml); | |||
$expected->setTimeZone(new \DateTimeZone('UTC')); | |||
$expected->setDate($year, $month, $day); | |||
$expected->setTime($hour, $minute, $second); | |||
@$expected->setTime($hour, $minute, $second, 1000000 * ($second - (int) $second)); |
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.
why do we need to silent it now ?
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.
Because the method takes 3 args before 7.1, and 4 since 7.1 ($microseconds)
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.
Why not making the call dependent on the executed PHP version then?
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.
👍
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 had HHVM in mind, I don't know if the version check will be valid (now or later when they'll implement this). Do as you prefer :)
Should make CI green again with PHP 7.1 RC4.