Skip to content

Commit

Permalink
Merge pull request #19 from PHPCompatibility/feature/update-php72-pol…
Browse files Browse the repository at this point in the history
…yfill-ruleset

PHP 7.2 polyfill: Update the ruleset
  • Loading branch information
wimg authored Jul 19, 2020
2 parents ad6219b + fbde03a commit 95bd6b3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PHPCompatibilitySymfonyPolyfillPHP72/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@

<rule ref="PHPCompatibility">
<!-- https://github.com/symfony/polyfill-php72/blob/master/bootstrap.php -->
<exclude name="PHPCompatibility.Constants.NewConstants.php_float_digFound"/>
<exclude name="PHPCompatibility.Constants.NewConstants.php_float_epsilonFound"/>
<exclude name="PHPCompatibility.Constants.NewConstants.php_float_minFound"/>
<exclude name="PHPCompatibility.Constants.NewConstants.php_float_maxFound"/>
<exclude name="PHPCompatibility.Constants.NewConstants.php_os_familyFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sapi_windows_vt100_supportFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.stream_isattyFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.utf8_encodeFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.utf8_decodeFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.spl_object_idFound"/>
<exclude name="PHPCompatibility.Constants.NewConstants.php_os_familyFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.mb_ordFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.mb_chrFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.mb_scrubFound"/>
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ All code within the PHPCompatibility organisation is released under the GNU Less

## Changelog

### 1.1.3 - 2020-07-19

* `PHPCompatibilitySymfonyPolyfillPHP72` ruleset: allow for four polyfilled `PHP_FLOAT_*` constants, which were added in `polyfill-php72` version `1.16.0`.

### 1.1.2 - 2020-05-20

* `PHPCompatibilitySymfonyPolyfillPHP56` ruleset: allow for two polyfilled LDAP constants (undocumented in the Polyfill docs)
Expand Down
2 changes: 2 additions & 0 deletions Test/SymfonyPolyfillPHP72Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
$d = sapi_windows_vt100_support();

$e = mb_scrub(mb_ord(mb_chr(spl_object_id(), $encoding), $encoding), $encoding);

$floats = PHP_FLOAT_DIG + PHP_FLOAT_EPSILON + PHP_FLOAT_MIN + PHP_FLOAT_MAX;

0 comments on commit 95bd6b3

Please sign in to comment.