Skip to content
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

Modifies the lexer to parse UTF-16 surrogate pairs in string literals #556

Merged
merged 4 commits into from
Oct 17, 2019
Merged

Modifies the lexer to parse UTF-16 surrogate pairs in string literals #556

merged 4 commits into from
Oct 17, 2019

Conversation

jakevoytko
Copy link
Contributor

Here's the companion change to #554. Happy to make any changes in the lexer to make it fit in better with the surrounding code

@vladar
Copy link
Member

vladar commented Oct 15, 2019

Cool, thanks! But the build is broken due to code style checks. Can you take a look (quick hint: run composer check-all) to check locally

@jakevoytko
Copy link
Contributor Author

I pushed the lint update. I additionally rebased against the CHANGELOG.md conflict this PR had against my other change.

$code = hexdec($hex);

// UTF-16 surrogate pair detection and handling.
$high_order_byte = $code >> 8;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, we are supposed to have camelCase for variable names via phpcs. @simPod any ideas why it would miss this snake case?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vladar Yea, sorry... Will be in v7, introduced here doctrine/coding-standard#128 (by me what an accident! 😂 )

V7 of Doctrine CS is going to be cool, many new things to check for. I'll send PR here when it's released.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I manually updated the variables to lowerCamelCase in the meantime

@vladar vladar merged commit de93375 into webonyx:master Oct 17, 2019
@vladar
Copy link
Member

vladar commented Oct 17, 2019

Good job! Thanks

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

Successfully merging this pull request may close these issues.

3 participants