Constant C3_CODECOVERAGE_MEDIATE_STORAGE can be used before it's defined
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Locate the __c3_error handler and the code that defines C3_CODECOVERAGE_MEDIATE_STORAGE, then trace the failure path when Codeception\Configuration is unavailable. Reproduce that path and ensure the error-log fallback does not use the constant before it is defined.
Written by the indexing model from the issue text.
Description
If these lines fail:
try {
\Codeception\Configuration::config($config_file);
} catch (\Exception $e) {
__c3_error($e->getMessage());
}
due to \Codeception\Configuration not existing, then
$errorLogFile = defined('C3_CODECOVERAGE_ERROR_LOG_FILE') ?
C3_CODECOVERAGE_ERROR_LOG_FILE :
C3_CODECOVERAGE_MEDIATE_STORAGE . DIRECTORY_SEPARATOR . 'error.txt';
is called before
define('C3_CODECOVERAGE_MEDIATE_STORAGE', Codeception\Configuration::logDir() . 'c3tmp');
define('C3_CODECOVERAGE_PROJECT_ROOT', Codeception\Configuration::projectDir());
define('C3_CODECOVERAGE_TESTNAME', $_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE']);
is run.
- Dominant language
- PHP
- Stars
- 73
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Codeception/c3
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Codeception/c3#93 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Codeception/c3#76 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Codeception/c3#58 ·
-
Could not write error to log filePossibly taken @marcovtwout claimed this 2017 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Codeception/c3#41 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Codeception/c3#40 · 5 comments ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
taskforcesh/bullmq#5238 ·
Maintainers usually reply within 1 day
-
[Bug] v-change-database-password reports success but doesn't change the password when MySQL validate_password rejects itPossibly taken @bfs2021 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/jetpack#55517 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
area/import type/enhancement when/later
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day