Closed janmartenjongerius closed 5 years ago
A regression test has been added in branch issue/33
, which can be invoked by running:
php7.1 vendor/bin/phpunit tests/Regression/Issue33/Issue33Test.php
This will show that a timeout set to 5 seconds is exceeded. When diving into the issue, the problem comes from invoking:
$this->repository->getDependents(
$violation->getPackage()->getName()
)
Inside \Mediact\DependencyGuard\Violation\Filter\DependencyFilter::__invoke
It is important that PHP 7.1 is used, because of the lower limit to DependencyGuard and the upper limit of Magento compatibility.
Description
When a project gets analyzed and its dependencies have circular dependents, the DependencyFilter will cause a timeout, because it asks Composer to resolve the list of dependents recursively.
Steps to Reproduce
For now it seems to happen for this combination of requirements:
Expected behavior:
DependencyGuard finishes analysis as normal.
Actual behavior:
DependencyGuard reaches a process timeout or creates a segmentation fault.
Reproduces how often:
100% of the time, for affected packages.
Versions
1.0.6 | dev-master