Skip to content

Commit 79f3963

Browse files
authored
CI: added Symfony 4.0.0 environment and symfony-demo app included (#4681)
* CI: added Symfony 4.0.0 environment and symfony-demo app included * fixed running different commands for different Symfony versions * fixed travis tests * fixed running * Exlicitly setting suite for Symfony 4 tests * dont instal symfony/symfony for demo app in symfony 4 * fixed version comparison * Update .travis.yml * Update .travis.yml * fixed Symfony to load kernel from a different location * removed --no-dev for symfony-demo install * Update .travis.yml * Update .travis.yml
1 parent 6f7b49e commit 79f3963

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Codeception/Module/Symfony.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ public function _getContainer()
256256
*/
257257
protected function getKernelClass()
258258
{
259-
$path = \Codeception\Configuration::projectDir() . $this->config['app_path'];
260-
if (!file_exists(\Codeception\Configuration::projectDir() . $this->config['app_path'])) {
259+
$path = codecept_root_dir() . $this->config['app_path'];
260+
if (!file_exists(codecept_root_dir() . $this->config['app_path'])) {
261261
throw new ModuleRequireException(
262262
__CLASS__,
263263
"Can't load Kernel from $path.\n"
@@ -277,6 +277,11 @@ protected function getKernelClass()
277277
}
278278
$file = current($results);
279279

280+
if (file_exists(codecept_root_dir() . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php')) {
281+
// ensure autoloader from this dir is loaded
282+
require_once codecept_root_dir() . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
283+
}
284+
280285
require_once $file;
281286

282287
$possibleKernelClasses = [

0 commit comments

Comments
 (0)