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
AppKernel name only #4695
Comments
What kernel name causes a problem? |
I think if it causes a problem kernel name should be added to the config. |
I'm using app/Kernels/Frontend/FrontendKernel and have those suite.yml config: class_name: FunctionalTester
modules:
enabled:
- Symfony:
app_path: '../../app/Kernels/Frontend'
var_path: '../../var'
environment: 'test'
- Doctrine2:
depends: Symfony
- \frontend\Helper\Functional and got error from codeception: Kernel class was not found in /var/www/html/tests/frontend/../../app/Kernels/Frontend/FrontendKernel.php. Specify directory where file with Kernel class for your application is located with If I add FrontendKernel here: $possibleKernelClasses = [
'FrontendKernel',
'AppKernel', // Symfony Standard
'App\Kernel', // Symfony Flex
]; all seems to be fine. As I see, this code was added for symfony 4 in one of last commits, because it was working for me before. |
Yes, that's right, we updated code for symfony 4. Sure as in all major update there could have happened some breaking things unnoticed. I think we should add this option to config |
I have two options for simple resolving the issue:
|
I guess both options are fine, but I prefer first one, with app_path which can handle not only folder name but full filename too. Thanks:D |
I have tried to implement first options without second and found that it is not trivial in the case of namespaced kernel like Symfony Flex provide by default. We need to provide full kernel class name or use something like https://github.com/goaop/parser-reflection/blob/master/src/ReflectionFile.php to detetmine it. On other hand, we can ignore @DavertMik what do you think about it? |
Providing full kernel class name sounds ok to me.
Yes. That would be fine |
Any updates on the issue? We have the same problem with namespaced kernel class, it doesn't let as run any functional or integration tests, which require the kernel. |
I made a PR to solve this #5022 |
This issue was solved by #5022 |
Details
Code listed above disables possibility to run tests with kernels named different than AppKernel.
composer show
)The text was updated successfully, but these errors were encountered: