[dev] When to require, suggest or require-dev Re: PHPUnit 9.5 compat

Ralf Lang lang at b1-systems.de
Mon Mar 29 06:27:08 UTC 2021


Am 28.03.2021 um 13:20 schrieb Jan Schneider:
>
> Zitat von Ralf Lang <lang at b1-systems.de>:
>
>> Hello,
>>
>>
>>> A colleague and I began converting some library unit tests to
>>> phpunit 9.
>>>
>>> This meant
>>
>> While upgrading the unit test for horde/date to github actions, phpunit
>> 9, I stumbled across a little problem.
>>
>> Some unit tests require but don't check for the horde/icalendar library.
>>
>> https://github.com/maintaina-com/Date/runs/2141049425?check_suite_focus=true
>>
>>
>> Icalendar is only suggested for horde/date but no dependency.
>>
>> What would be the right path here?
>>
>> - make the icalendar library a require-dev
>> - install all suggests for unit testing
>> - Make the tests skip on missing optional dependency
>
> Good question. Does compser support at package at both places,
> require-dev and suggests? If not, then the 2nd option.
>
I tested it and it does not complain, so best solution would be
suggest+require-dev.

-- 
Ralf Lang
Linux Consultant / Developer
Tel.: +49-170-6381563
Mail: lang at b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537



More information about the dev mailing list