[pkg-php-pear] Bug#1039834: php-slim: FTBFS with phpunit 10: make[1]: *** [debian/rules:21: override_dh_auto_test] Error 2

Athos Ribeiro athoscribeiro at gmail.com
Wed Jun 28 22:25:09 BST 2023


Source: php-slim
Version: 3.12.4-1
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: pkg-php-pear at lists.alioth.debian.org
Usertags: phpunit

Hi,

We will start the phpunit 10 transition in unstable soon. During a test
rebuild, php-slim was found to FTBFS.

To reproduce this locally, you need to install the phpunit 10 package (and any
other dependency, which should also be available) from experimental on an
unstable system or build chroot.

Relevant part (hopefully):
> There were 3 PHPUnit test runner warnings:
> 
> 1) Class CallableTest cannot be found in /<<PKGBUILDDIR>>/tests/Mocks/CallableTest.php
> 
> 2) Class InvocationStrategyTest cannot be found in /<<PKGBUILDDIR>>/tests/Mocks/InvocationStrategyTest.php
> 
> 3) Class InvokableTest cannot be found in /<<PKGBUILDDIR>>/tests/Mocks/InvokableTest.php
> 
> --
> 
> There was 1 PHPUnit test runner deprecation:
> 
> 1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!
> 
> --
> 
> There were 13 errors:
> 
> 1) Slim\Tests\AppTest::testInvokeWithPimpleCallable
> Error: Call to undefined method PHPUnit\Framework\MockObject\MockBuilder::setMethods()
> 
> /<<PKGBUILDDIR>>/tests/AppTest.php:1617
> 
> 2) Slim\Tests\AppTest::testRespondIndeterminateLength
> Error: Call to undefined method PHPUnit\Framework\MockObject\MockBuilder::setMethods()
> 
> /<<PKGBUILDDIR>>/tests/AppTest.php:2086
> 
> 3) Slim\Tests\AppTest::testExceptionErrorHandlerDoesNotDisplayErrorDetails
> Error: Call to undefined method Slim\Tests\AppTest::assertNotRegExp()
> 
> /<<PKGBUILDDIR>>/tests/AppTest.php:2238
> 
> 4) Slim\Tests\AppTest::testExceptionPhpErrorHandlerDoesNotDisplayErrorDetails
> Error: Call to undefined method Slim\Tests\AppTest::assertNotRegExp()
> 
> /<<PKGBUILDDIR>>/tests/AppTest.php:2277
> 
> 5) Slim\Tests\AppTest::testExceptionErrorHandlerDisplaysErrorDetails
> Error: Call to undefined method Slim\Tests\AppTest::assertRegExp()
> 
> /<<PKGBUILDDIR>>/tests/AppTest.php:2475
> 
> 6) Slim\Tests\DeferredCallableTest::testItBindsClosuresToContainer
> Error: Call to undefined method PHPUnit\Framework\MockObject\MockBuilder::setMethods()
> 
> /<<PKGBUILDDIR>>/tests/DeferredCallableTest.php:30
> 
> 7) Slim\Tests\Handlers\ErrorTest::testPreviousException
> Error: Call to undefined method PHPUnit\Framework\MockObject\MockBuilder::setMethods()
> 
> /<<PKGBUILDDIR>>/tests/Handlers/ErrorTest.php:90
> 
> 8) Slim\Tests\Handlers\NotAllowedTest::testNotFoundContentType
> Error: Call to undefined method PHPUnit\Framework\MockObject\MockBuilder::setMethods()
> 
> /<<PKGBUILDDIR>>/tests/Handlers/NotAllowedTest.php:63
> 
> 9) Slim\Tests\Handlers\NotFoundTest::testNotFoundContentType
> Error: Call to undefined method PHPUnit\Framework\MockObject\MockBuilder::setMethods()
> 
> /<<PKGBUILDDIR>>/tests/Handlers/NotFoundTest.php:50
> 
> 10) Slim\Tests\Handlers\PhpErrorTest::testNotFoundContentType
> Error: Call to undefined method PHPUnit\Framework\MockObject\MockBuilder::setMethods()
> 
> /<<PKGBUILDDIR>>/tests/Handlers/PhpErrorTest.php:76
> 
> 11) Slim\Tests\Http\RequestTest::testGetRequestTargetWithSlimPsr7Uri
> Error: Call to undefined method Slim\Tests\Http\RequestTest::prophesize()
> 
> /<<PKGBUILDDIR>>/tests/Http/RequestTest.php:458
> /usr/bin/phpunit:74
> 
> 12) Slim\Tests\Http\RequestTest::testGetRequestTargetWithNonSlimPsr7Uri
> Error: Call to undefined method Slim\Tests\Http\RequestTest::prophesize()
> 
> /<<PKGBUILDDIR>>/tests/Http/RequestTest.php:477
> /usr/bin/phpunit:74
> 
> 13) Slim\Tests\Http\UploadedFilesTest::testMoveToStream
> Error: Call to undefined method Slim\Tests\Http\UploadedFilesTest::assertFileNotExists()
> 
> /<<PKGBUILDDIR>>/tests/Http/UploadedFilesTest.php:231
> /usr/bin/phpunit:74
> 
> --
> 
> There were 2 failures:
> 
> 1) Slim\Tests\ContainerTest::testGetWithErrorThrownByFactoryClosure
> Failed asserting that exception of type "Error" matches expected exception "InvalidArgumentException". Message was: "Call to undefined method PHPUnit\Framework\MockObject\MockBuilder::setMethods()" at
> /<<PKGBUILDDIR>>/tests/ContainerTest.php:76
> .
> 
> 2) Slim\Tests\Handlers\ErrorTest::testNotFoundContentType
> Failed asserting that exception of type "Error" matches expected exception "UnexpectedValueException". Message was: "Call to undefined method PHPUnit\Framework\MockObject\MockBuilder::setMethods()" at
> /<<PKGBUILDDIR>>/tests/Handlers/ErrorTest.php:73
> .
> 
> --
> 
> 10 tests triggered 10 PHPUnit deprecations:
> 
> 1) Slim\Tests\Handlers\ErrorTest::testError
> Data Provider method Slim\Tests\Handlers\ErrorTest::errorProvider() is not static
> 
> /<<PKGBUILDDIR>>/tests/Handlers/ErrorTest.php:39
> 
> 2) Slim\Tests\Handlers\ErrorTest::testErrorDisplayDetails
> Data Provider method Slim\Tests\Handlers\ErrorTest::errorProvider() is not static
> 
> /<<PKGBUILDDIR>>/tests/Handlers/ErrorTest.php:57
> 
> 3) Slim\Tests\Handlers\NotAllowedTest::testInvalidMethod
> Data Provider method Slim\Tests\Handlers\NotAllowedTest::invalidMethodProvider() is not static
> 
> /<<PKGBUILDDIR>>/tests/Handlers/NotAllowedTest.php:35
> 
> 4) Slim\Tests\Handlers\NotFoundTest::testNotFound
> Data Provider method Slim\Tests\Handlers\NotFoundTest::notFoundProvider() is not static
> 
> /<<PKGBUILDDIR>>/tests/Handlers/NotFoundTest.php:36
> 
> 5) Slim\Tests\Handlers\PhpErrorTest::testPhpError
> Data Provider method Slim\Tests\Handlers\PhpErrorTest::phpErrorProvider() is not static
> 
> /<<PKGBUILDDIR>>/tests/Handlers/PhpErrorTest.php:39
> 
> 6) Slim\Tests\Handlers\PhpErrorTest::testPhpErrorDisplayDetails
> Data Provider method Slim\Tests\Handlers\PhpErrorTest::phpErrorProvider() is not static
> 
> /<<PKGBUILDDIR>>/tests/Handlers/PhpErrorTest.php:57
> 
> 7) Slim\Tests\Handlers\PhpErrorTest::testPhpError5
> Data Provider method Slim\Tests\Handlers\PhpErrorTest::phpErrorProvider() is not static
> 
> /<<PKGBUILDDIR>>/tests/Handlers/PhpErrorTest.php:92
> 
> 8) Slim\Tests\Handlers\PhpErrorTest::testPhpErrorDisplayDetails5
> Data Provider method Slim\Tests\Handlers\PhpErrorTest::phpErrorProvider() is not static
> 
> /<<PKGBUILDDIR>>/tests/Handlers/PhpErrorTest.php:115
> 
> 9) Slim\Tests\Http\UploadedFilesTest::testCreateFromEnvironmentFromFilesSuperglobal
> Data Provider method Slim\Tests\Http\UploadedFilesTest::providerCreateFromEnvironment() is not static
> 
> /<<PKGBUILDDIR>>/tests/Http/UploadedFilesTest.php:64
> 
> 10) Slim\Tests\Http\UploadedFilesTest::testCreateFromEnvironmentFromUserData
> Data Provider method Slim\Tests\Http\UploadedFilesTest::providerCreateFromEnvironment() is not static
> 
> /<<PKGBUILDDIR>>/tests/Http/UploadedFilesTest.php:77
> 
> --
> 
> There were 9 risky tests:
> 
> 1) Slim\Tests\AppTest::testInvokeWithPimpleCallable
> This test did not perform any assertions
> 
> /<<PKGBUILDDIR>>/tests/AppTest.php:1601
> 
> 2) Slim\Tests\AppTest::testRespondIndeterminateLength
> This test did not perform any assertions
> 
> /<<PKGBUILDDIR>>/tests/AppTest.php:2080
> 
> 3) Slim\Tests\DeferredCallableTest::testItBindsClosuresToContainer
> This test did not perform any assertions
> 
> /<<PKGBUILDDIR>>/tests/DeferredCallableTest.php:28
> 
> 4) Slim\Tests\Handlers\ErrorTest::testPreviousException
> This test did not perform any assertions
> 
> /<<PKGBUILDDIR>>/tests/Handlers/ErrorTest.php:88
> 
> 5) Slim\Tests\Handlers\NotAllowedTest::testNotFoundContentType
> This test did not perform any assertions
> 
> /<<PKGBUILDDIR>>/tests/Handlers/NotAllowedTest.php:61
> 
> 6) Slim\Tests\Handlers\NotFoundTest::testNotFoundContentType
> This test did not perform any assertions
> 
> /<<PKGBUILDDIR>>/tests/Handlers/NotFoundTest.php:48
> 
> 7) Slim\Tests\Handlers\PhpErrorTest::testNotFoundContentType
> This test did not perform any assertions
> 
> /<<PKGBUILDDIR>>/tests/Handlers/PhpErrorTest.php:74
> 
> 8) Slim\Tests\Http\RequestTest::testGetRequestTargetWithSlimPsr7Uri
> This test did not perform any assertions
> 
> /<<PKGBUILDDIR>>/tests/Http/RequestTest.php:452
> 
> 9) Slim\Tests\Http\RequestTest::testGetRequestTargetWithNonSlimPsr7Uri
> This test did not perform any assertions
> 
> /<<PKGBUILDDIR>>/tests/Http/RequestTest.php:474
> 
> ERRORS!
> Tests: 625, Assertions: 1012, Errors: 13, Failures: 2, Warnings: 3, Deprecations: 11, Skipped: 14, Risky: 9.
> make[1]: *** [debian/rules:21: override_dh_auto_test] Error 2


The full build logs and additional context is available at
http://people.ubuntu.com/~athos-ribeiro/rebuilds/phpunit10/0/php-slim/

A phpunit reverse-dependencies rebuild status is available at
http://people.ubuntu.com/~athos-ribeiro/rebuilds/phpunit10/index.html

-- 
Athos Ribeiro



More information about the pkg-php-pear mailing list