File tree Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ public function __construct($appenv, $debug)
34
34
{
35
35
$ this ->appenv = $ appenv ;
36
36
$ this ->debug = $ debug ;
37
- putenv ("APP_DEBUG= " . ($ debug ? 'TRUE ' : 'FALSE ' ));
37
+ putenv ("APP_DEBUG= " . ($ debug ? 'true ' : 'false ' ));
38
+ putenv ("APP_ENV= " . $ this ->appenv );
38
39
}
39
40
40
41
/**
@@ -49,17 +50,27 @@ public function getStaticDirectory() {
49
50
*/
50
51
public function getApplication ()
51
52
{
53
+
54
+ if (file_exists ('bootstrap/autoload.php ' )) {
55
+ require_once 'bootstrap/autoload.php ' ;
56
+ }
57
+
52
58
// Laravel 5 / Lumen
53
59
if (file_exists ('bootstrap/app.php ' )) {
54
- return $ this ->app = require_once 'bootstrap/app.php ' ;
60
+ $ this ->app = require_once 'bootstrap/app.php ' ;
55
61
}
56
62
57
63
// Laravel 4
58
64
if (file_exists ('bootstrap/start.php ' )) {
59
- require_once 'bootstrap/autoload.php ' ;
60
- return $ this ->app = require_once 'bootstrap/start.php ' ;
65
+ $ this ->app = require_once 'bootstrap/start.php ' ;
66
+ }
67
+
68
+ if (!$ this ->app ) {
69
+ throw new \RuntimeException ('Laravel bootstrap file not found ' );
61
70
}
62
71
63
- throw new \RuntimeException ('Laravel bootstrap file not found ' );
72
+ $ this ->app ->boot ();
73
+
74
+ return $ this ->app ;
64
75
}
65
76
}
Original file line number Diff line number Diff line change @@ -136,12 +136,7 @@ protected static function mapRequest(ReactRequest $reactRequest)
136
136
*/
137
137
protected static function mapResponse (HttpResponse $ reactResponse , SymfonyResponse $ syResponse )
138
138
{
139
- $ syResponse ->sendHeaders ();
140
-
141
- ob_start ();
142
- $ syResponse ->sendContent ();
143
- $ content = ob_get_contents ();
144
- ob_end_clean ();
139
+ $ content = $ syResponse ->getContent ();
145
140
146
141
$ headers = $ syResponse ->headers ->allPreserveCase ();
147
142
$ cookies = [];
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " php-pm/httpkernel-adapter" ,
3
3
"require" : {
4
- "stack/builder" : " ^1.0" ,
5
4
"symfony/http-foundation" : " ^2.6|^3.0" ,
6
5
"symfony/http-kernel" : " ^2.6|^3.0"
7
6
},
You can’t perform that action at this time.
0 commit comments