Open calvinalkan opened 2 years ago
How do you avoid version conflicts when components have different versions of the same libraries installed?
@Naktibalda https://github.com/symplify/monorepo-builder
This hoists all vendor deps to the root codeception.yml
@Naktibalda Why is that relevant tho?
Do you think that this is a bug, if yes Ill create a PR.
On a somewhat related note, since it's on the same line (https://github.com/Codeception/Codeception/blob/cbaa347a683bd5d2f44aefeef57aec31989525ea/src/Codeception/Configuration.php#L750-L752), what about allowing .yaml as an extension? .yml seems so Windows-y, even DOS, the 3-letter file extension.
The following root config
Will recursively traverse all directories inside
src/components
and look forcodeception.yml
files.Now I faced the following situation:
A dependent of one component forgot to put codeception.yml into .gitattributes so that it ends up in the directory when installed with composer.
src/components/component-a/vendor/some-dependency/codeception.yml
When running tests for all included suites, codeception will also try to run tests for
src/components/component-a/vendor/some-dependency
.This is due to the fact that the
include
config is passed here as is intoFinder::in()
from symfony/finder.This method makes the finder traverse all child directories recursively which leads to
src/components/component-a/vendor/some-dependency/codeception.yml
getting picked up.At least I find this behavior confusing. Given the above configuration I expect only direct child directories of
src/components
to be evaluated by codeception and not the entire tree undersrc/components
.Possible fixes:
Assuming this is a bug and not intended, there a two ways to fix this.