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
11 changes: 10 additions & 1 deletion PHPCompatibilitySymfonyPolyfillPHP84/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@
Detection for the Deprecated attribute is incomplete in PHPCompatibility 10.0.0-alpha1.
Handling for this should be added once the detection implementation is known.
-->

<exclude name="PHPCompatibility.Classes.NewClasses.pdo_dblibFound"/>
<exclude name="PHPCompatibility.Classes.NewClasses.pdo_firebirdFound"/>
<exclude name="PHPCompatibility.Classes.NewClasses.pdo_mysqlFound"/>
<exclude name="PHPCompatibility.Classes.NewClasses.pdo_odbcFound"/>
<exclude name="PHPCompatibility.Classes.NewClasses.pdo_pgsqlFound"/>
<exclude name="PHPCompatibility.Classes.NewClasses.pdo_sqliteFound"/>
<exclude name="PHPCompatibility.Classes.NewClasses.reflectionconstantFound"/>
</rule>

Expand All @@ -43,6 +48,10 @@
<exclude-pattern>/polyfill-php84/Resources/stubs/ReflectionConstant\.php$</exclude-pattern>
</rule>

<rule ref="PHPCompatibility.Namespaces.ReservedNames.pdoFound">
<exclude-pattern>/polyfill-php84/Resources/stubs/Pdo/(Dblib|Firebird|Mysql|Odbc|Pgsql|Sqlite)\.php$</exclude-pattern>
</rule>

<!-- This is fine as the autoloading for this file should only ever be triggered when on PHP 8.0 or higher. -->
<rule ref="PHPCompatibility.Classes.NewTypedProperties.Found">
<exclude-pattern>/polyfill-php84/Resources/stubs/Deprecated\.php$</exclude-pattern>
Expand Down
8 changes: 8 additions & 0 deletions Test/SymfonyPolyfillPHP84Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@
#[Deprecated]
function foo() {}
*/

$db = new Pdo\Dblib;
$db = new \Pdo\Firebird;
function doSomething(
Pdo\Mysql $db
) : Pdo\Odbc {}
$db = new Pdo\Pgsql;
$db = new \Pdo\Sqlite;
Loading