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

PHPCompatibility ruleset for random_compat #154

Open
jrfnl opened this issue Oct 7, 2018 · 0 comments
Open

PHPCompatibility ruleset for random_compat #154

jrfnl opened this issue Oct 7, 2018 · 0 comments

Comments

@jrfnl
Copy link
Contributor

jrfnl commented Oct 7, 2018

Hi all,

This is just a "service message".

For those people who use this library and use PHPCompatibility in their CI process, there is now a custom ruleset available which can be used to prevent false positives being thrown by PHPCompatibility for the native PHP functionality being polyfilled by this repo.

You can find the repo for the PHPCompatibilityParagonieRandomCompat ruleset here on Github as well as on Packagist.

Hope someone will find it useful 😄

P.S.: If anyone is interested in helping us to maintain the ruleset, please open an issue in the repo.

jrfnl added a commit to PHPCompatibility/PHPCompatibilityParagonie that referenced this issue Oct 8, 2018
…t the polyfill rulesets, I came across [this issue](paragonie/random_compat#151) 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`.
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

No branches or pull requests

1 participant