Symfony2Extension icon indicating copy to clipboard operation
Symfony2Extension copied to clipboard

Prevent require dir error when kernel path is null

Open guilliamxavier opened this issue 6 years ago • 1 comments

Bug fix: yes.

After #141, the new default value for kernel bootstrap and path options is null, but, unlike for bootstrap, the processing of path doesn't check for emptiness, thus the test file_exists($kernel = $basePath . '/' . $kernelPath) where $kernelPath is null (or empty string) does like file_exists($kernel = $basePath . '/') which is true although $kernel then denotes a directory (not a file) which later causes an error.

So I simply added a check similar to $bootstrapPath a few lines above.

guilliamxavier avatar Feb 03 '20 15:02 guilliamxavier

I have merged this wonderful PR into my continuation of this project: https://github.com/PHPExpertsInc/SymfonyExtension/

composer require --dev phpexperts/symfony-extension

It's 100% backward compatible with behat/symfony2-extension.

hopeseekr avatar Sep 02 '22 21:09 hopeseekr