[pkg-php-pear] Bug#1139520: php-mock-phpunit: FTBFS: There was 1 error: 1) phpmock\phpunit\MockObjectProxyTest::testExpects

Santiago Vila sanvila at debian.org
Tue Jun 9 11:30:01 BST 2026


Package: src:php-mock-phpunit
Version: 2.15.0-2
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202606/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:php-mock-phpunit, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --with phpcomposer
   dh_clean
 debian/rules binary
dh binary --with phpcomposer
   dh_update_autotools_config
   dh_autoreconf
   debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
phpab	--output debian-autoload.php \
	--template debian/autoload.php.tpl \
	classes/ tests/
phpab %development% - Copyright (C) 2009 - 2026 by Arne Blankerts and Contributors

Scanning directory classes/
Scanning directory tests/

Autoload file debian-autoload.php generated.

tail -n+2 autoload.php >> debian-autoload.php
cp debian-autoload.php debian/autoload.php
# Workaround to ensure the local class takes precedence during tests.
mkdir --parents phpmock/phpunit
ln -s ../../debian-autoload.php phpmock/phpunit/autoload.php
# Build classloader for tests
mkdir --parents vendor
phpab	--output vendor/autoload.php \
	--template debian/autoload.test.php.tpl \
	tests/
phpab %development% - Copyright (C) 2009 - 2026 by Arne Blankerts and Contributors

Scanning directory tests/

Autoload file vendor/autoload.php generated.

make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
phpunit --do-not-cache-result \
	--bootstrap vendor/autoload.php \
	tests
PHPUnit 13.1.14 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.4.22
Configuration: /<<PKGBUILDDIR>>/phpunit.xml

..E.DDDDDDDD.D.DDDDDDDDDDDDDDD.....RR                             37 / 37 (100%)

Time: 00:00.073, Memory: 12.00 MB

There was 1 PHPUnit error:

1) phpmock\phpunit\MockObjectProxyTest::testProxiedMethods
The data provider phpmock\phpunit\MockObjectProxyTest::provideTestProxiedMethods specified for phpmock\phpunit\MockObjectProxyTest::testProxiedMethods is invalid
Too few arguments to function PHPUnit\Framework\MockObject\InvocationHandler::__construct(), 2 passed in /<<PKGBUILDDIR>>/tests/MockObjectProxyTest.php on line 175 and at least 3 expected

/<<PKGBUILDDIR>>/tests/MockObjectProxyTest.php:144

--

There was 1 error:

1) phpmock\phpunit\MockObjectProxyTest::testExpects
TypeError: Mockery_1_PHPUnit_Framework_MockObject_MockObject::expects(): Return value must be of type PHPUnit\Framework\MockObject\InvocationMocker, PHPUnit\Framework\MockObject\InvocationStubberImplementation returned

/<<PKGBUILDDIR>>/classes/MockObjectProxyReturnTypes120.php:70
/<<PKGBUILDDIR>>/tests/MockObjectProxyTest.php:78

--

There were 2 risky tests:

1) phpmock\phpunit\PHPMockTest::testPreserveArgumentDefaultValue
This test did not perform any assertions

/<<PKGBUILDDIR>>/tests/PHPMockTest.php:128

2) phpmock\phpunit\PHPMockTest::testResetToDefaultArgumentOfOriginalFunction
This test did not perform any assertions

/<<PKGBUILDDIR>>/tests/PHPMockTest.php:131

ERRORS!
Tests: 37, Assertions: 74, Errors: 2, PHPUnit Deprecations: 13, Risky: 2.
make[1]: *** [debian/rules:24: override_dh_auto_test] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:5: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------



More information about the pkg-php-pear mailing list