Skip to content
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 bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ define('OPENDXP_CONSOLE', true);

Bootstrap::setProjectRoot();

return function (array $context) {
return static function () {
$kernel = Bootstrap::startupCli();

return new Application($kernel);
Expand Down
15 changes: 2 additions & 13 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,13 @@
*/

use OpenDxp\Bootstrap;
use OpenDxp\Tool;
use Symfony\Component\HttpFoundation\Request;

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

Bootstrap::setProjectRoot();

return function (Request $request, array $context) {

// set current request as property on tool as there's no
// request stack available yet
Tool::setCurrentRequest($request);

return static function () {
Bootstrap::bootstrap();
$kernel = Bootstrap::kernel();

// reset current request - will be read from request stack from now on
Tool::setCurrentRequest(null);

return $kernel;
return Bootstrap::kernel();
};