proposed migration duty - special php edition

Christian Ehrhardt christian.ehrhardt at canonical.com
Tue Mar 3 15:08:58 UTC 2020


On Tue, Mar 3, 2020 at 3:41 PM Christian Ehrhardt <
christian.ehrhardt at canonical.com> wrote:

>
>
> On Tue, Mar 3, 2020 at 3:08 PM Christian Ehrhardt <
> christian.ehrhardt at canonical.com> wrote:
>
>>
>>
>> On Tue, Mar 3, 2020 at 12:38 PM Christian Ehrhardt <
>> christian.ehrhardt at canonical.com> wrote:
>> ...
>>
>>> Class III:
>>> - php-http-request2
>>>   - PHP Fatal error:  Declaration of
>>> HTTP_Request2_Adapter_CommonNetworkTest::setUp() must be compatible with
>>> PHPUnit\Framework\TestCase::setUp(): void in
>>> /tmp/autopkgtest.Ih0Z0B/build.kMc/src/HTTP_Request2-2.3.0/tests/Request2/Adapter/CommonNetworkTest.php
>>> on line 5 (no idea yet)
>>> - php-net-ldap2 - same as the error in php-http-request2
>>>
>>> => TODO Class III issues are still open and free for grabbing by anyone
>>>
>>
>> Taking a first look at these now ...
>>
>
>
> Note: both packages are rather rarely updated. Both still refer to git://
> anonscm.debian.org
>
> Note: There is an old patch `phpunit6_compatibility.patch` that touches
> the offending file already.
>
> The code extends phpunit:
>   abstract class HTTP_Request2_Adapter_CommonNetworkTest extends
> PHPUnit\Framework\TestCase
>
> This is defined in phpunit src/Framework/TestCase.php:
>  416     protected function setUp(): void
>
>  417     {
>
>  418     }
>
> vs
>
>  122     protected function setUp()
>
>
> Ok, it seems the :void type was added and needs to be adapted for.
>
> Trying to recreate the same in a local VM works, so we can iterate in
> there.
>
> The tests will succeed if we just append the : void as needed.
>
> But it becomes clear that they will need more work later.
> The result is RC==0 but showing a lot of:
> The @expectedException, @expectedExceptionCode, @expectedExceptionMessage,
> and @expectedExceptionMessageRegExp annotations are deprecated. They will
> be removed in PHPUnit 9. Refactor your test to use expectException(),
> expectExceptionCode(), expectExceptionMessage(), or
> expectExceptionMessageRegExp() instead.
>
> We also now hit the issue rbasak looked at and has a debdiff attached.
> => PHP Warning:  file_put_contents(/usr/bin/.phpunit.result.cache): failed
> to open stream: Permission denied in
> /usr/share/php/PHPUnit/Runner/DefaultTestResultCache.php on line 108
>
> The root cause change in phpunit can be seen here
>
> https://github.com/sebastianbergmann/phpunit/commit/f5e5add13e73933c65878f53d5a94cdc0f120cc4
> and explained here
> https://github.com/sebastianbergmann/phpunit/issues/3288
> https://phpunit.de/announcements/phpunit-7.html
>
> Here are two debdiffs for bryce to consider.
> They will need the debdiff that Rbasak provided in -proposed first.
>

I've started test builds and will later trigger tests in
https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3963/+packages
https://bileto.ubuntu.com/#/ticket/3963

I already found that php-net-ldap2 needed a v2 which is attached here:


P.S. The projects seem dormant, not sure if upstreaming is worth. Both
> compat v6 and v7 patches are not usptreamed either. The way it is we can
> retain them ... for now.
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20200303/1fda9a41/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-phpunit8.5-php-net-ldap2-v2.debdiff
Type: application/octet-stream
Size: 6047 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20200303/1fda9a41/attachment.obj>


More information about the ubuntu-server mailing list