Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions PHPCompatibilitySymfonyPolyfillPHP84/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.mb_trimFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.mb_ltrimFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.mb_rtrimFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.bcceilFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.bcdivmodFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.bcfloorFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.bcroundFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.grapheme_str_splitFound"/>

<!-- https://github.com/symfony/polyfill-php84/tree/1.x/Resources/stubs -->
Expand Down Expand Up @@ -68,6 +71,11 @@
<exclude-pattern>/polyfill-php84/bootstrap82\.php$</exclude-pattern>
</rule>

<!-- This is fine as this file will only be used for PHP 8.1 - 8.3. -->
<rule ref="PHPCompatibility.Keywords.NewKeywords.t_enumFound">
<exclude-pattern>/polyfill-php84/Resources/RoundingMode\.php$</exclude-pattern>
</rule>

<!--
Not a false positive, but a bug in the Symfony PHP 8.4 polyfill package.
Bug has been reported: https://github.com/symfony/polyfill/issues/499#issuecomment-3430423298
Expand Down
4 changes: 4 additions & 0 deletions Test/SymfonyPolyfillPHP84Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ function doSomething(
) : Pdo\Odbc {}
$db = new Pdo\Pgsql;
$db = new \Pdo\Sqlite;

bcceil($num);
bcfloor($num);
bcround($num, 2, RoundingMode::HalfAwayFromZero);
Loading