Skip to content

PHP 8.4 deprecation warnings #42

@rxu

Description

@rxu

Since PHP 8.4 implicitly nullable parameter declarations has been deprecated, so there's a couple of deprecation warnings thrown on DBUnit while using on PHP 8.4:

PHPUnit\DbUnit\Database\DefaultConnection::createDataSet(): Implicitly marking parameter $tableNames as nullable is deprecated, the explicit nullable type must be used instead
PHPUnit\DbUnit\Database\DataSet::buildTableSelect(): Implicitly marking parameter $databaseConnection as nullable is deprecated, the explicit nullable type must be used instead

So, for PHP 8.4 those parameters need to be typehinted as array|null and Connection|null respectively.
Thanks for supporting DBUnit :)

EDIT: okay, union type is not possible for PHP 7.4. So, there should be another fix probably.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions