Browse Source

[php] Openswoole update to PHP 8.3 (#8595)

* [php] Openswoole update to PHP 8.3

* Updated to v2.1.0 in Postgresql docker

* Fix deprecated error

* Fix deprecated errors in postgres

* Revert postgres to php8.2 & oswoole 22.0.0
Joan Miquel 1 year ago
parent
commit
bfe3d6afb4

+ 1 - 1
frameworks/PHP/openswoole/openswoole-no-async.dockerfile

@@ -1,4 +1,4 @@
-FROM php:8.2-cli
+FROM php:8.3-cli
 
 RUN apt-get update && apt-get install -y git > /dev/null
 

+ 1 - 1
frameworks/PHP/openswoole/openswoole-server-mysql.php

@@ -111,7 +111,7 @@ $fortunes_mysql = function ($pool): string {
  *
  * @return string
  */
-$updates_mysql = function (int $queries = 0, $pool): string {
+$updates_mysql = function (int $queries, $pool): string {
     $db = $pool->get();
 
     $query_count = 1;

+ 2 - 2
frameworks/PHP/openswoole/openswoole-server-postgres.php

@@ -40,7 +40,7 @@ $server->on('workerStart', function () use (&$pool) {
  *
  * @return string
  */
-$db_postgres = function (int $queries = 0, $pool): string {
+$db_postgres = function (int $queries, $pool): string {
     $db = $pool->get();
     // Read number of queries to run from URL parameter
     $query_count = 1;
@@ -116,7 +116,7 @@ $fortunes_postgres = function ($pool): string {
  *
  * @return string
  */
-$updates_postgres = function (int $queries = 0, $pool): string {
+$updates_postgres = function (int $queries, $pool): string {
     $db = $pool->get();
 
     $query_count = 1;

+ 1 - 1
frameworks/PHP/openswoole/openswoole.dockerfile

@@ -1,4 +1,4 @@
-FROM php:8.2-cli
+FROM php:8.3-cli
 
 RUN apt-get update && apt-get install -y git > /dev/null