Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect parameter reference in error message #322

Open
xepozz opened this issue Jan 25, 2023 · 0 comments
Open

Incorrect parameter reference in error message #322

xepozz opened this issue Jan 25, 2023 · 0 comments
Labels

Comments

@xepozz
Copy link
Member

xepozz commented Jan 25, 2023

What steps will reproduce the problem?

I have stateless TestCaseGenerator that is being injected without any problems, buy I haven't specified what is $testMethodGenerators. I expected to get an error about it, but instead I got wrong parameter mention.

readonly class MethodGenerator
{
    public function __construct(
        private TestCaseGenerator $testCaseGenerator,
        /**
         * @var TestMethodGeneratorInterface[]
         */
        private array $testMethodGenerators,
    ) {
    }
}

What is the expected result?

No definition or class found or resolvable for "... MethodGenerator::$testMethodGenerators"

What do you get instead?

Yiisoft\Di\NotFoundException: No definition or class found or resolvable for "Xepozz\TestIt\TestGenerator\TestCaseGenerator" while building "Xepozz\TestIt\TestGenerator" -> "Xepozz\TestIt\Parser\ContextMethodVisitor" -> "Xepozz\TestIt\TestGenerator\MethodGenerator" -> "Xepozz\TestIt\TestGenerator\TestCaseGenerator".

Additional info

Q A
Version 1.0.?
PHP version
Operating system
@samdark samdark added the type:bug Bug label Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants