You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A call to getObjectForTrait() works on PHPUnit 7.1.2, but fails when installing the same version with composer up --prefer-lowest. Following is the list of changed packages when prefer lowest is enabled.
$ composer up --prefer-lowest
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 10 updates, 3 removals
- Removing webmozart/assert (1.3.0)
- Removing phpdocumentor/type-resolver (0.4.0)
- Removing phpdocumentor/reflection-common (1.0.1)
- Updating scriptfusion/retry (1.1.1 => 1.1.0): Loading from cache
- Updating amphp/amp (v2.0.6 => v2.0.0): Loading from cache
- Updating psr/cache (1.0.1 => 1.0.0): Loading from cache
- Updating myclabs/deep-copy (1.7.0 => 1.6.1): Loading from cache
- Updating doctrine/instantiator (1.1.0 => 1.0.5): Loading from cache
- Installing dflydev/markdown (v1.0.0): Loading from cache
- Updating phpdocumentor/reflection-docblock (4.3.0 => 2.0.0): Loading from cache
- Updating phpspec/prophecy (1.7.5 => v1.7.0): Loading from cache
- Updating phpunit/php-file-iterator (1.4.5 => 1.4.3): Loading from cache
- Updating phpunit/php-code-coverage (6.0.3 => 6.0.1): Loading from cache
- Updating phpunit/phpunit-mock-objects (6.1.1 => 6.1.0): Loading from cache
Package dflydev/markdown is abandoned, you should avoid using it. Use michelf/php-markdown instead.
Writing lock file
Generating autoload files
Overriding phpunit/phpunit-mock-objects with version ^6.1.1 fixes the issue.
I understand what --prefer-lowest does but I do not understand why people use it, makes no sense to me. Why would you not want the latest version of a component that is compatible with the version of the component that is required?
@sebastianbergmann Since you understand --prefer-lowest you should understand why I'm using it because my reasons are the same as yours. I do not use it for development, only for my Composer constraint testing. However, there is no way I know of to only test my own constraints are correct: it also requires all dependencies to be using the correct constraints also. That is why I recommended you take a look at your test coverage for getObjectForTrait(), because it seems you must have a blind spot there.
A call to
getObjectForTrait()
works on PHPUnit 7.1.2, but fails when installing the same version withcomposer up --prefer-lowest
. Following is the list of changed packages when prefer lowest is enabled.Overriding
phpunit/phpunit-mock-objects
with version^6.1.1
fixes the issue.The text was updated successfully, but these errors were encountered: