Browse Source

[php] Update Flight to v3 (#9470)

* Update Flight to v3

* Fix plaintext
Joan Miquel 7 months ago
parent
commit
bbf0585b15
2 changed files with 4 additions and 5 deletions
  1. 2 2
      frameworks/PHP/flight/composer.json
  2. 2 3
      frameworks/PHP/flight/index.php

+ 2 - 2
frameworks/PHP/flight/composer.json

@@ -1,5 +1,5 @@
 {
 {
     "require": {
     "require": {
-        "mikecao/flight": "^2.0"
+        "mikecao/flight": "^3.0"
     }
     }
-}
+}

+ 2 - 3
frameworks/PHP/flight/index.php

@@ -13,9 +13,8 @@ Flight::route('/json', function() {
 // Plaintext test
 // Plaintext test
 Flight::route('/plaintext', function() {
 Flight::route('/plaintext', function() {
 	Flight::response()
 	Flight::response()
-		->header('Content-Type', 'text/plain')
-		->write('Hello, World!')
-		->send();
+	->header('Content-Type', 'text/plain');
+	echo 'Hello, World!';
 });
 });
 
 
 // DB test
 // DB test