-
Notifications
You must be signed in to change notification settings - Fork 144
[BUGFIX] Fix type errors in PHP strict mode #664
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
This fix fixes the type errors in strict mode as seen on this build: https://github.com/MyIntervals/PHP-CSS-Parser/actions/runs/10540068716/job/29204329414?pr=641 |
72a2a60
to
1c97969
Compare
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 more of a code cleanup than an actual bugfix, so I'm not sure the changelog entry is warranted. It's also ambiguous since the library itself (currently) has a 'strict mode' option for the CSS.
CHANGELOG.md
Outdated
@@ -46,6 +46,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). | |||
|
|||
### Fixed | |||
|
|||
- Fix type errors in strict mode (#664) |
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 think it should be clarified that this refers to PHP's strict mode. The library itself also has a strict mode setting for the CSS (which we plan to remove).
Though I'm not sure this warrants a changelog entry at all. It's not fixing any actual bug; merely allowing for declare_strict
to be introduced, with a couple of explicit casts to replace the implicit ones.
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've clarified this accordingly.
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'd like to keep the changelog entry. This was actually something where the code was incorrect (passing a float
or int
where only a string
was allowed) - only PHP's implicit type conversations had allowed us to get away with this so far. 😉
1c97969
to
ddf5a2f
Compare
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 the backport of #664.
No description provided.