PhpStorm cannot resolve Codeception Gherkin step definitions from classes in Support/Step configured via gherkin.contexts
Hello,
I’d like to report an issue with step navigation / resolution in PhpStorm for Codeception Gherkin tests.
Environment:
PhpStorm: 2025.3.1.1
Codeception: 5.3.4
PHP: 8.4.14
OS: Linux
Project structure (simplified):
- tests/e2e/Acceptance/*.feature
- tests/e2e/Support/Step/*.php
- tests/e2e/config/acceptance.suite.yml
In acceptance.suite.yml, contexts are configured like this:
gherkin:
contexts:
default:
- E2E\Support\Step\UserSteps - E2E\Support\Step\CourseSteps
Example feature:
Feature: Course assignment
Scenario: Add trainee
When I add trainee "john@example.com" to any course
Then I should see success message
Example step class:
namespace E2E\Support\Step;
final class CourseSteps
{
/**
* @When I add trainee :email to any course
*/
public function iAddTraineeToAnyCourse(string $email): void
{
// ...
}
}
Issue:
PhpStorm does not navigate from a feature step to the step definition in Support/Step classes configured via gherkin.contexts.
If the same step is placed in AcceptanceTester.php, PhpStorm resolves it correctly.
Expected behavior:
PhpStorm should resolve and navigate step definitions declared in classes listed under Codeception gherkin.contexts, not only those in AcceptanceTester.
Actual behavior:
The step in the .feature file is unresolved (or has no navigation target), even though the test executes correctly in Codeception.
Please let me know if you need a minimal reproducible repository; I can provide one.
请先登录再写评论。
Hil,
Please upvote and track WI-59746.