[pkg-php-pear] Bug#1070574: php-mock: FTBFS with phpunit 11: PHPUnit\Framework\Exception: PHP Fatal error: Trait "phpmock\TestCaseTrait" not found in /<<PKGBUILDDIR>>/tests/MockNamespaceTest.php on line 20
Athos Ribeiro
athoscribeiro at gmail.com
Mon May 6 15:21:05 BST 2024
Source: php-mock
Version: 2.3.1-1
Severity: normal
Justification: FTBFS
Tags: trixie sid ftbfs
User: pkg-php-pear at lists.alioth.debian.org
Usertags: phpunit11
Hi,
phpunit 11 is out and is now available in experimental. During a test rebuild,
php-mock was found to fail to build with this new phpunit version.
To reproduce this locally, you need to install phpunit from experimental on an
unstable system or build chroot.
Relevant part (hopefully):
> make[1]: Entering directory '/<<PKGBUILDDIR>>'
> phpunit --do-not-cache-result \
> --bootstrap vendor/autoload.php \
> tests
> PHPUnit 11.1.2 by Sebastian Bergmann and contributors.
>
> Runtime: PHP 8.2.18
> Configuration: /<<PKGBUILDDIR>>/phpunit.xml
>
> .........E.................................................... 62 / 62 (100%)
>
> Time: 00:00.105, Memory: 10.00 MB
>
> There were 14 PHPUnit errors:
>
> 1) phpmock\MockCaseInsensitivityTest::testFailEnable
> The data provider specified for phpmock\MockCaseInsensitivityTest::testFailEnable is invalid
> Data Provider method phpmock\MockCaseInsensitivityTest::provideTestCaseSensitivity() is not static
>
> /<<PKGBUILDDIR>>/tests/MockCaseInsensitivityTest.php:38
>
> 2) phpmock\MockCaseInsensitivityTest::testCaseSensitivity
> The data provider specified for phpmock\MockCaseInsensitivityTest::testCaseSensitivity is invalid
> Data Provider method phpmock\MockCaseInsensitivityTest::provideTestCaseSensitivity() is not static
>
> /<<PKGBUILDDIR>>/tests/MockCaseInsensitivityTest.php:61
>
> 3) phpmock\MockTest::testBackupStaticAttributes
> The data provider specified for phpmock\MockTest::testBackupStaticAttributes is invalid
> Data Provider method phpmock\MockTest::provideTestBackupStaticAttributes() is not static
>
> /<<PKGBUILDDIR>>/tests/MockTest.php:319
>
> 4) phpmock\environment\SleepEnvironmentBuilderTest::testUsleep
> The data provider specified for phpmock\environment\SleepEnvironmentBuilderTest::testUsleep is invalid
> Data Provider method phpmock\environment\SleepEnvironmentBuilderTest::provideTestUsleep() is not static
>
> /<<PKGBUILDDIR>>/tests/environment/SleepEnvironmentBuilderTest.php:88
>
> 5) phpmock\functions\AbstractSleepFunctionTest::testSleepIncrementation
> The data provider specified for phpmock\functions\AbstractSleepFunctionTest::testSleepIncrementation is invalid
> Data Provider method phpmock\functions\AbstractSleepFunctionTest::provideTestSleepIncrementation() is not static
>
> /<<PKGBUILDDIR>>/tests/functions/AbstractSleepFunctionTest.php:44
>
> 6) phpmock\functions\FixedMicrotimeFunctionTest::testConstructFailsForInvalidArgument
> The data provider specified for phpmock\functions\FixedMicrotimeFunctionTest::testConstructFailsForInvalidArgument is invalid
> Data Provider method phpmock\functions\FixedMicrotimeFunctionTest::provideTestConstructFailsForInvalidArgument() is not static
>
> /<<PKGBUILDDIR>>/tests/functions/FixedMicrotimeFunctionTest.php:97
>
> 7) phpmock\functions\FixedMicrotimeFunctionTest::testConstruct
> The data provider specified for phpmock\functions\FixedMicrotimeFunctionTest::testConstruct is invalid
> Data Provider method phpmock\functions\FixedMicrotimeFunctionTest::provideTestConstruct() is not static
>
> /<<PKGBUILDDIR>>/tests/functions/FixedMicrotimeFunctionTest.php:125
>
> 8) phpmock\functions\IncrementableTest::testIncrement
> The data provider specified for phpmock\functions\IncrementableTest::testIncrement is invalid
> Data Provider method phpmock\functions\IncrementableTest::provideTestIncrement() is not static
>
> /<<PKGBUILDDIR>>/tests/functions/IncrementableTest.php:28
>
> 9) phpmock\functions\MicrotimeConverterTest::testConvertStringToFloat
> The data provider specified for phpmock\functions\MicrotimeConverterTest::testConvertStringToFloat is invalid
> Data Provider method phpmock\functions\MicrotimeConverterTest::provideFloatAndStrings() is not static
>
> /<<PKGBUILDDIR>>/tests/functions/MicrotimeConverterTest.php:26
>
> 10) phpmock\functions\MicrotimeConverterTest::testConvertFloatToString
> The data provider specified for phpmock\functions\MicrotimeConverterTest::testConvertFloatToString is invalid
> Data Provider method phpmock\functions\MicrotimeConverterTest::provideFloatAndStrings() is not static
>
> /<<PKGBUILDDIR>>/tests/functions/MicrotimeConverterTest.php:41
>
> 11) phpmock\generator\MockFunctionGeneratorTest::testRemoveDefaultArguments
> The data provider specified for phpmock\generator\MockFunctionGeneratorTest::testRemoveDefaultArguments is invalid
> Data Provider method phpmock\generator\MockFunctionGeneratorTest::provideTestRemoveDefaultArguments() is not static
>
> /<<PKGBUILDDIR>>/tests/generator/MockFunctionGeneratorTest.php:26
>
> 12) phpmock\generator\ParameterBuilderTest::testBuild
> The data provider specified for phpmock\generator\ParameterBuilderTest::testBuild is invalid
> Data Provider method phpmock\generator\ParameterBuilderTest::provideTestBuild() is not static
>
> /<<PKGBUILDDIR>>/tests/generator/ParameterBuilderTest.php:27
>
> 13) phpmock\spy\SpyTest::testBackupStaticAttributes
> The data provider specified for phpmock\spy\SpyTest::testBackupStaticAttributes is invalid
> Data Provider method phpmock\spy\SpyTest::provideTestBackupStaticAttributes() is not static
>
> /<<PKGBUILDDIR>>/tests/spy/SpyTest.php:319
>
> 14) phpmock\spy\SpyTest::testGetInvocations
> The data provider specified for phpmock\spy\SpyTest::testGetInvocations is invalid
> Data Provider method phpmock\spy\SpyTest::provideTestGetInvocations() is not static
>
> /<<PKGBUILDDIR>>/tests/spy/SpyTest.php:46
>
> --
>
> There were 6 PHPUnit test runner warnings:
>
> 1) Class phpmock\AbstractMockTest declared in /<<PKGBUILDDIR>>/tests/AbstractMockTest.php is abstract
>
> 2) No tests found in class "phpmock\MockCaseInsensitivityTest".
>
> 3) No tests found in class "phpmock\functions\IncrementableTest".
>
> 4) No tests found in class "phpmock\functions\MicrotimeConverterTest".
>
> 5) No tests found in class "phpmock\generator\MockFunctionGeneratorTest".
>
> 6) No tests found in class "phpmock\generator\ParameterBuilderTest".
>
> --
>
> There were 116 PHPUnit test runner deprecations:
>
...
>
> --
>
> There was 1 error:
>
> 1) phpmocktest\MockNamespaceTest::testDefiningNamespaces
> PHPUnit\Framework\Exception: PHP Fatal error: Trait "phpmock\TestCaseTrait" not found in /<<PKGBUILDDIR>>/tests/MockNamespaceTest.php on line 20
> Fatal error: Trait "phpmock\TestCaseTrait" not found in /<<PKGBUILDDIR>>/tests/MockNamespaceTest.php on line 20
>
> ERRORS!
> Tests: 62, Assertions: 105, Errors: 15, Warnings: 6, Deprecations: 116.
> make[1]: *** [debian/rules:22: override_dh_auto_test] Error 2
The full build log is available at
http://people.ubuntu.com/~athos-ribeiro/rebuilds/phpunit11/1/php-mock/php-mock_2.3.1-1+rebuild1714781159_amd64-2024-05-04T00:06:00Z.build
More information about the pkg-php-pear
mailing list