testing-framework icon indicating copy to clipboard operation
testing-framework copied to clipboard

Problem with SQLite on PHP 8.0

Open tomasnorre opened this issue 3 years ago • 1 comments

Hi,

I have experienced a problem with nimut/testing-framework and PHP 8.0.14 When I run the PHPUnit command

$ TYPO3_PATH_WEB=$PWD/.Build/Web typo3DatabaseDriver=pdo_sqlite .Build/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml Tests/Functional

I run into an exception, thrown by https://github.com/Nimut/testing-framework/blob/main/src/TestingFramework/TestSystem/AbstractTestSystem.php#L729 as dbname isn't defined.

This is not a problem with PHP 7.4.

If I adjust my command to also include typo3DatabaseName=test it's working like expected.

$ TYPO3_PATH_WEB=$PWD/.Build/Web typo3DatabaseDriver=pdo_sqlite typo3DatabaseName=test .Build/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml Tests/Functional

I haven't found out what the reason for the different behaviour here is. But I would expect it to be something with a default value resolved differently in PHP 8.0.

I'll see if I find the issue and a solution. But for now I wanted to share the information in case others runs into the problem.

tomasnorre avatar Jan 16 '22 17:01 tomasnorre

This should work when using https://github.com/TYPO3/testing-framework

lolli42 avatar Jul 17 '22 13:07 lolli42