You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I upgraded my api-platform project from 2.4.2 to 2.5.3, im not exactly sure where the different behavior from the behat-extension comes from, but i found that: on the older version, the environment on vendor/behat/symfony2-extension/src/Behat/Symfony2Extension/ServiceContainer/Symfony2Extension.php:process looks like this:
if (file_exists($kernel = $basePath . '/' . $kernelPath))
which will be true, as the concatenated string points to a directory and file_exists treats files and directories the same. If we would trigger the other if-branch, we would set just $kernelPath (null) to Definition->file (and i think that would actually work on createService later on..?)
So, question: i'm not quite sure about that, but shouldnt we use
if (file_exists($kernel = $basePath . '/' . $kernelPath) && is_file($kernel))
instead, to ensure that we are pointing to a file and not a directory?
Site-note, if someone else runs into this: just set the path on the extension definition:
I upgraded my api-platform project from 2.4.2 to 2.5.3, im not exactly sure where the different behavior from the behat-extension comes from, but i found that: on the older version, the environment on
vendor/behat/symfony2-extension/src/Behat/Symfony2Extension/ServiceContainer/Symfony2Extension.php:process
looks like this:while after the upgrade it is this:
then we do on
Symfony2Extension.php:138
which will be true, as the concatenated string points to a directory and
file_exists
treats files and directories the same. If we would trigger the other if-branch, we would set just$kernelPath
(null) toDefinition->file
(and i think that would actually work oncreateService
later on..?)So, question: i'm not quite sure about that, but shouldnt we use
instead, to ensure that we are pointing to a file and not a directory?
Site-note, if someone else runs into this: just set the
path
on the extension definition:The text was updated successfully, but these errors were encountered: