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)
3434 {
3535 $ this ->appenv = $ appenv ;
3636 $ this ->debug = $ debug ;
37- putenv ("APP_DEBUG= " . ($ debug ? 'TRUE ' : 'FALSE ' ));
37+ putenv ("APP_DEBUG= " . ($ debug ? 'true ' : 'false ' ));
38+ putenv ("APP_ENV= " . $ this ->appenv );
3839 }
3940
4041 /**
@@ -49,17 +50,27 @@ public function getStaticDirectory() {
4950 */
5051 public function getApplication ()
5152 {
53+
54+ if (file_exists ('bootstrap/autoload.php ' )) {
55+ require_once 'bootstrap/autoload.php ' ;
56+ }
57+
5258 // Laravel 5 / Lumen
5359 if (file_exists ('bootstrap/app.php ' )) {
54- return $ this ->app = require_once 'bootstrap/app.php ' ;
60+ $ this ->app = require_once 'bootstrap/app.php ' ;
5561 }
5662
5763 // Laravel 4
5864 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 ' );
6170 }
6271
63- throw new \RuntimeException ('Laravel bootstrap file not found ' );
72+ $ this ->app ->boot ();
73+
74+ return $ this ->app ;
6475 }
6576}
Original file line number Diff line number Diff line change @@ -136,12 +136,7 @@ protected static function mapRequest(ReactRequest $reactRequest)
136136 */
137137 protected static function mapResponse (HttpResponse $ reactResponse , SymfonyResponse $ syResponse )
138138 {
139- $ syResponse ->sendHeaders ();
140-
141- ob_start ();
142- $ syResponse ->sendContent ();
143- $ content = ob_get_contents ();
144- ob_end_clean ();
139+ $ content = $ syResponse ->getContent ();
145140
146141 $ headers = $ syResponse ->headers ->allPreserveCase ();
147142 $ cookies = [];
Original file line number Diff line number Diff line change 11{
22 "name" : " php-pm/httpkernel-adapter" ,
33 "require" : {
4- "stack/builder" : " ^1.0" ,
54 "symfony/http-foundation" : " ^2.6|^3.0" ,
65 "symfony/http-kernel" : " ^2.6|^3.0"
76 },
You can’t perform that action at this time.
0 commit comments