-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
DX: re-apply PHP CS Fixer, partially #52398
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
Conversation
@@ -128,7 +128,7 @@ public static function hexToDateTime(string $time): \DateTimeImmutable | |||
|
|||
if (self::TIME_OFFSET_BIN <= $time) { | |||
$time = self::add($time, self::TIME_OFFSET_COM2); | |||
$time[0] = $time[0] & "\x7F"; | |||
$time[0] &= "\x7F"; |
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.
AFAIK, this is not the same for string indexes. Would need double checking if this was fixed in recent versions of PHP.
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.
What is the string index here? (not the [0]
, right?)
It is causing CI to fail, let's revert for now indeed
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.
yes it is, same for the other similar changes in the PR
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.
this is not the same for string indexes.
can you elaborate on that string index
a bit? I'm not aware what is the underlying issue here.
same for the other similar changes in the PR
after revert ot &=
, CI is green (ok, except of fabbot for file license-headers)
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.
Sure: https://3v4l.org/GI1NW
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.
Rule marked as risky, at least: PHP-CS-Fixer/PHP-CS-Fixer#7418
perhaps, with time we can have better detection if we touch index or not
e05a31c
to
110d13b
Compare
Thank you @keradus. |
One further step to clean the CS status-quo, aiming for all-green in long-term.
~90 files remaining, yet they may require some further update on tool itself
best to review commit by commit