Fix missing absolute path resolving in ParamsLoader#6828
Fix missing absolute path resolving in ParamsLoader#6828TavoNiievez merged 1 commit intoCodeception:mainfrom
Conversation
This is a regression bugfix for release 5.2.0. With Codeception#6767 the ParamsLoader was streamlined, but when previously `$paramsFile` was passed to the loader methods, now only `$paramStorage` is passed, which misses getting converted to an absolute path via `codecept_absolute_path()`. This patch restores utilizing `$paramsFile` and also uses that to emit warnings when a file cannot be loaded. This bug caused missing file resolving, because software like TYPO3 for example executes tests from the repo directory `typo3/sysext/core/Tests/codeception.yml` and uses: ``` params: - parameters.yml - env.yml ``` and expects that the file is found next to the `codeception.yml` file in the same directory, and thus a breaking change.
|
@garvinhicking Would there be any way to have tests for this? We need to verify that it does not change again in the future as our CI did not notice this error. I will release version 5.2.1 today for this and PHPUnit 12 support. Thank you very much. |
|
Thanks for the trust in advance. :) I'll see what I can do for some tests, I haven't yet checked this out, but should be possible. Give me a day or two. |
|
@TavoNiievez I tried to get the tests up and running, according to the dockerized README in which just yields: Seems that I assume that I would add tests with some dummy codeception.yaml files plus configured |
This is a regression bugfix for release 5.2.0.
With #6767 the ParamsLoader was streamlined, but when previously
$paramsFilewas passed to the loader methods, now only$paramStorageis passed, which misses getting converted to an absolute path viacodecept_absolute_path().This patch restores utilizing
$paramsFileand also uses that to emit warnings when a file cannot be loaded.This bug caused missing file resolving, because software like TYPO3 for example executes tests from the repo directory
typo3/sysext/core/Tests/codeception.ymland uses:and expects that the file is found next to the
codeception.ymlfile in the same directory, and thus a breaking change.Closes #6829