Skip to content

Commit 7c38133

Browse files
authored
Merge pull request #2044 from soyuka/web-server-bundle
Add web server bundle for debug purpose
2 parents 55cad47 + 41abcff commit 7c38133

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/Fixtures/app/public/index.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the API Platform project.
5+
*
6+
* (c) Kévin Dunglas <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
declare(strict_types=1);
13+
14+
use Symfony\Component\HttpFoundation\Request;
15+
16+
require __DIR__.'/../bootstrap.php';
17+
$env = $_SERVER['APP_ENV'] ?? 'test';
18+
$kernel = new AppKernel($env, $_SERVER['APP_DEBUG'] ?? ('prod' !== $env));
19+
$request = Request::createFromGlobals();
20+
$response = $kernel->handle($request);
21+
$response->send();
22+
$kernel->terminate($request, $response);

0 commit comments

Comments
 (0)