Skip to content

Add project path to app Kernel instanciation #555

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

Merged
1 commit merged into from
Mar 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion symfony/console/3.3/bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ if ($_SERVER['APP_DEBUG']) {
}
}

$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG'], dirname(__DIR__));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be part of a 4.3+ recipe only instead ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the other entrypoint then (public/index.php) I guess.

To me: 3.3

That's been done acting on @nicolas-grekas's recommendation above. I'll let him give his own rationale 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicating all the files in the recipe is not worth it.

$application = new Application($kernel);
$application->run($input);
2 changes: 1 addition & 1 deletion symfony/framework-bundle/4.2/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Request::setTrustedHosts([$trustedHosts]);
}

$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG'], dirname(__DIR__));
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
Expand Down