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

Ruleset: prevent false positives on random_compat polyfill code #2

Merged
merged 1 commit into from
Oct 8, 2018

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 8, 2018

When notifying the polyfill repos about the polyfill rulesets, I came across this issue and figured we could fix that.


When PHPCompatibility(ParagonieRandomCompat) is run over the code in the random_compat repo itself, it will detect some non-issues.

The code in the files is all wrapped within proper defined(), version_compare() and/or function_exists() conditions and will never be executed on incompatible PHP versions.

This simple change prevents these non-issues from being reported.

This fix does rely on people having installed the package in a directory called random_compat.

When `PHPCompatibility(ParagonieRandomCompat)` is run over the code in the `random_compat` repo itself, it will detect some non-issues.

The code in the files is all wrapped within proper `defined()`, `version_compare()` and/or `function_exists()` conditions and will never be executed on incompatible PHP versions.

This simple change prevents these non-issues from being reported.

This fix does rely on people having installed the package in a directory called `random_compat`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants