This is an automated email from the ASF dual-hosted git repository.

lukeroy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-php.git


The following commit(s) were added to refs/heads/master by this push:
     new 23d6a55  Add php 8.3 and remove php 8.0 (#138)
23d6a55 is described below

commit 23d6a5538606f62dae9661cf9e6d5aa1ab117d0d
Author: Luke Roy <[email protected]>
AuthorDate: Mon Jan 29 16:37:51 2024 +0100

    Add php 8.3 and remove php 8.0 (#138)
    
    * Add PHP 8.3
    
    * Add PHP 8.3 rest files
    
    * Remove php 8.0 as it is now deprecated
    
    * use buster
    
    * update system libraries
    
    * remove comments used for testing
    
    * updated postgres
    
    * Update core/php8.3Action/CHANGELOG.md
    
    Co-authored-by: David Grove <[email protected]>
    
    * Update core/php8.3Action/CHANGELOG.md
    
    Co-authored-by: David Grove <[email protected]>
    
    ---------
    
    Co-authored-by: David Grove <[email protected]>
---
 .github/workflows/ci.yaml                          |  4 +--
 README.md                                          | 39 +++++++++++-----------
 core/php8.0Action/composer.json                    | 11 ------
 core/{php8.0Action => php8.3Action}/CHANGELOG.md   | 22 +++---------
 core/{php8.0Action => php8.3Action}/Dockerfile     | 14 ++++----
 core/{php8.0Action => php8.3Action}/build.gradle   |  2 +-
 core/{php8.0Action => php8.3Action}/compile.php    |  0
 core/php8.3Action/composer.json                    | 11 ++++++
 core/{php8.0Action => php8.3Action}/php.ini        |  0
 core/{php8.0Action => php8.3Action}/runner.php     |  3 +-
 settings.gradle                                    |  2 +-
 ...Tests.scala => Php83ActionContainerTests.scala} |  4 +--
 12 files changed, 50 insertions(+), 62 deletions(-)

diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 9a4d016..fbb2e6c 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -88,12 +88,12 @@ jobs:
         working-directory: runtime
         run: |
           SHORT_COMMIT=$(git rev-parse --short "$GITHUB_SHA")
-          ./gradlew :core:php8.0Action:distDocker -PdockerRegistry=docker.io 
-PdockerImagePrefix=openwhisk -PdockerImageTag=nightly
-          ./gradlew :core:php8.0Action:distDocker -PdockerRegistry=docker.io 
-PdockerImagePrefix=openwhisk -PdockerImageTag=$SHORT_COMMIT
           ./gradlew :core:php8.1Action:distDocker -PdockerRegistry=docker.io 
-PdockerImagePrefix=openwhisk -PdockerImageTag=nightly
           ./gradlew :core:php8.1Action:distDocker -PdockerRegistry=docker.io 
-PdockerImagePrefix=openwhisk -PdockerImageTag=$SHORT_COMMIT
           ./gradlew :core:php8.2Action:distDocker -PdockerRegistry=docker.io 
-PdockerImagePrefix=openwhisk -PdockerImageTag=nightly
           ./gradlew :core:php8.2Action:distDocker -PdockerRegistry=docker.io 
-PdockerImagePrefix=openwhisk -PdockerImageTag=$SHORT_COMMIT
+          ./gradlew :core:php8.3Action:distDocker -PdockerRegistry=docker.io 
-PdockerImagePrefix=openwhisk -PdockerImageTag=nightly
+          ./gradlew :core:php8.3Action:distDocker -PdockerRegistry=docker.io 
-PdockerImagePrefix=openwhisk -PdockerImageTag=$SHORT_COMMIT
       - name: Push Release Images
         if: ${{ env.PUSH_RELEASE == 'true' }}
         working-directory: runtime
diff --git a/README.md b/README.md
index 6b34939..32cd9b1 100644
--- a/README.md
+++ b/README.md
@@ -23,11 +23,16 @@
 
 ## PHP versions
 
-This runtime provides PHP 8.2, 8.1 and 8.0
+This runtime provides PHP 8.3, 8.2 and 8.1
 
 ### Give it a try today
 To use as a docker action
 
+PHP 8.3:
+```
+wsk action update myAction myAction.php --docker 
openwhisk/action-php-v8.3:latest
+```
+
 PHP 8.2:
 ```
 wsk action update myAction myAction.php --docker 
openwhisk/action-php-v8.2:latest
@@ -38,16 +43,16 @@ PHP 8.1:
 wsk action update myAction myAction.php --docker 
openwhisk/action-php-v8.1:latest
 ```
 
-PHP 8.0:
-```
-wsk action update myAction myAction.php --docker 
openwhisk/action-php-v8.0:latest
-```
-
 This works on any deployment of Apache OpenWhisk
 
 ### To use on deployment that contains the runtime as a kind
 To use as a kind action
 
+PHP 8.3:
+```
+wsk action update myAction myAction.php --kind php:8.3
+```
+
 PHP 8.2:
 ```
 wsk action update myAction myAction.php --kind php:8.2
@@ -58,30 +63,26 @@ PHP 8.1:
 wsk action update myAction myAction.php --kind php:8.1
 ```
 
-PHP 8.0:
-```
-wsk action update myAction myAction.php --kind php:8.0
-```
 
 
 ### Local development
 
 ```
+./gradlew core:php8.3Action:distDocker
 ./gradlew core:php8.2Action:distDocker
 ./gradlew core:php8.1Action:distDocker
-./gradlew core:php8.0Action:distDocker
 ```
-This will produce the images `whisk/action-php-v8.2` and 
`whisk/action-php-v8.1`, `whisk/action-php-v8.0` respectively.
+This will produce the images `whisk/action-php-v8.3`, `whisk/action-php-v8.2` 
and `whisk/action-php-v8.1` respectively.
 
 Build and Push image
 ```
 docker login
+./gradlew core:php8.3Action:distDocker -PdockerImagePrefix=$prefix-user 
-PdockerRegistry=docker.io
 ./gradlew core:php8.2Action:distDocker -PdockerImagePrefix=$prefix-user 
-PdockerRegistry=docker.io
 ./gradlew core:php8.1Action:distDocker -PdockerImagePrefix=$prefix-user 
-PdockerRegistry=docker.io
-./gradlew core:php8.0Action:distDocker -PdockerImagePrefix=$prefix-user 
-PdockerRegistry=docker.io
 ```
 
-Deploy OpenWhisk using ansible environment that contains the kinds `php:8.2`, 
`php:8.1` and `php:8.0`
+Deploy OpenWhisk using ansible environment that contains the kinds `php:8.3`, 
`php:8.2` and `php:8.1`
 Assuming you have OpenWhisk already deploy locally and `OPENWHISK_HOME` 
pointing to root directory of OpenWhisk core repository.
 
 Set `ROOTDIR` to the root directory of this repository.
@@ -106,6 +107,10 @@ wskdev fresh -t local-php
 
 To use as docker action push to your own dockerhub account
 ```
+docker tag whisk/php8.2Action $user_prefix/action-php-v8.3
+docker push $user_prefix/action-php-v8.3
+```
+```
 docker tag whisk/php8.2Action $user_prefix/action-php-v8.2
 docker push $user_prefix/action-php-v8.2
 ```
@@ -113,14 +118,10 @@ docker push $user_prefix/action-php-v8.2
 docker tag whisk/php8.1Action $user_prefix/action-php-v8.1
 docker push $user_prefix/action-php-v8.1
 ```
-```
-docker tag whisk/php8.0Action $user_prefix/action-php-v8.0
-docker push $user_prefix/action-php-v8.0
-```
 
 Then create the action using your image from dockerhub
 ```
-wsk action update myAction myAction.php --docker $user_prefix/action-php-v8.0
+wsk action update myAction myAction.php --docker $user_prefix/action-php-v8.1
 ```
 The `$user_prefix` is usually your dockerhub user id.
 
diff --git a/core/php8.0Action/composer.json b/core/php8.0Action/composer.json
deleted file mode 100644
index 8380a12..0000000
--- a/core/php8.0Action/composer.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-    "config": {
-        "platform": {
-            "php": "8.0"
-        }
-    },
-    "require": {
-        "guzzlehttp/guzzle": "7.2.0",
-        "ramsey/uuid": "4.1.1"
-    }
-}
diff --git a/core/php8.0Action/CHANGELOG.md b/core/php8.3Action/CHANGELOG.md
similarity index 70%
rename from core/php8.0Action/CHANGELOG.md
rename to core/php8.3Action/CHANGELOG.md
index 366f823..e0bf8ef 100644
--- a/core/php8.0Action/CHANGELOG.md
+++ b/core/php8.3Action/CHANGELOG.md
@@ -17,24 +17,10 @@
 #
 -->
 
-## Apache 1.19.0
-  - No change
+## Initial Release
 
-## Apache 1.18.0
-  - Use php:8.0-cli-buster image to always pull latest patch version
-  - Golang Action loop updatetd to golang 1.20
-  - Support array result include sequence action (#120)
 
-## Apache 1.17.0
-  - Update version of PHP to 8.0.8
-  - Build actionloop from [email protected] (#107)
-  - Resolve akka versions explicitly. (#105, #104)
-
-## Apache 1.16.0
-Initial release
-
-- Added: PHP: 8.0.2
-- Used openwhisk-runtime-go 1.17.0 to build proxy
+- Added: PHP: 8.3.2
 - Added: PHP extensions in addition to the standard ones:
     - bcmath
     - curl
@@ -49,5 +35,5 @@ Initial release
     - zip
     - mongo
 - Added: Composer packages:
-    - [guzzlehttp/guzzle](https://packagist.org/packages/guzzlehttp/guzzle): 
7.2.0
-    - [ramsey/uuid](https://packagist.org/packages/ramsey/uuid): 4.1.1
+    - [guzzlehttp/guzzle](https://packagist.org/packages/guzzlehttp/guzzle): 
7.8.1
+    - [ramsey/uuid](https://packagist.org/packages/ramsey/uuid): 4.7.5
diff --git a/core/php8.0Action/Dockerfile b/core/php8.3Action/Dockerfile
similarity index 91%
rename from core/php8.0Action/Dockerfile
rename to core/php8.3Action/Dockerfile
index 3fe8578..533371a 100644
--- a/core/php8.0Action/Dockerfile
+++ b/core/php8.3Action/Dockerfile
@@ -33,7 +33,7 @@ RUN curl -sL \
   && cd openwhisk-runtime-go-*/main\
   && GO111MODULE=on CGO_ENABLED=0 go build -o /bin/proxy
 
-FROM php:8.0-cli-buster
+FROM php:8.3-cli-bookworm
 
 # select the builder to use
 ARG GO_PROXY_BUILD_FROM=release
@@ -45,10 +45,11 @@ RUN apt-get -y update \
     && apt-get -y install --no-install-recommends \
       unzip \
       libfreetype6 \
-      libicu63 \
+      libicu72 \
       libjpeg62-turbo \
       libpng16-16 \
-      libssl1.1 \
+      libssl3 \
+      libssl-dev \
       libxml2 \
       libzip4 \
       libpq5 \
@@ -60,7 +61,7 @@ RUN apt-get -y update \
       libssl-dev \
       libxml2-dev \
       libzip-dev \
-      postgresql-server-dev-11 \
+      postgresql-server-dev-15 \
     \
     && docker-php-ext-install \
       bcmath \
@@ -74,11 +75,10 @@ RUN apt-get -y update \
       zip \
     \
     && mkdir -p /usr/src/php/ext/mongodb \
-    && curl -fsSL https://pecl.php.net/get/mongodb-1.9.0RC1 | tar xvz -C 
"/usr/src/php/ext/mongodb" --strip 1 \
+    && curl -fsSL https://pecl.php.net/get/mongodb-1.14.0 | tar xvz -C 
"/usr/src/php/ext/mongodb" --strip 1 \
     && docker-php-ext-install -j$(nproc) mongodb \
     \
     && apt-get purge -y --auto-remove $PHPIZE_DEPS \
-    && apt-get purge -y --auto-remove libclang-common-7-dev clang-7 llvm-7 
llvm-7-dev \
     && apt-get purge -y --auto-remove libfreetype6-dev \
       libicu-dev \
       libjpeg-dev \
@@ -86,7 +86,7 @@ RUN apt-get -y update \
       libssl-dev \
       libxml2-dev \
       libzip-dev \
-      postgresql-server-dev-11 \
+      postgresql-server-dev-15 \
     && apt-get autoremove -y \
     && apt-get clean -y \
     && rm -rf /usr/src/php
diff --git a/core/php8.0Action/build.gradle b/core/php8.3Action/build.gradle
similarity index 95%
rename from core/php8.0Action/build.gradle
rename to core/php8.3Action/build.gradle
index a716d1f..c21b147 100644
--- a/core/php8.0Action/build.gradle
+++ b/core/php8.3Action/build.gradle
@@ -15,5 +15,5 @@
  * limitations under the License.
  */
 
-ext.dockerImageName = 'action-php-v8.0'
+ext.dockerImageName = 'action-php-v8.3'
 apply from: '../../gradle/docker.gradle'
diff --git a/core/php8.0Action/compile.php b/core/php8.3Action/compile.php
similarity index 100%
rename from core/php8.0Action/compile.php
rename to core/php8.3Action/compile.php
diff --git a/core/php8.3Action/composer.json b/core/php8.3Action/composer.json
new file mode 100644
index 0000000..57a17e4
--- /dev/null
+++ b/core/php8.3Action/composer.json
@@ -0,0 +1,11 @@
+{
+    "config": {
+        "platform": {
+            "php": "8.3"
+        }
+    },
+    "require": {
+        "guzzlehttp/guzzle": "7.8.1",
+        "ramsey/uuid": "4.7.5"
+    }
+}
diff --git a/core/php8.0Action/php.ini b/core/php8.3Action/php.ini
similarity index 100%
rename from core/php8.0Action/php.ini
rename to core/php8.3Action/php.ini
diff --git a/core/php8.0Action/runner.php b/core/php8.3Action/runner.php
similarity index 96%
rename from core/php8.0Action/runner.php
rename to core/php8.3Action/runner.php
index 1fc569e..3bfe34b 100755
--- a/core/php8.0Action/runner.php
+++ b/core/php8.3Action/runner.php
@@ -75,6 +75,7 @@ while ($f = fgets(STDIN)) {
             file_put_contents('php://stdout', 'The action did not return a 
dictionary or array.');
             $result = (string)$result;
         } else {
+            // cast result to an object for json_encode to ensure that an 
empty array becomes "{}
             $result = json_encode((object)$result);
         }
     } catch (Throwable $e) {
@@ -86,6 +87,6 @@ while ($f = fgets(STDIN)) {
     file_put_contents('php://stderr', "\n");
     file_put_contents('php://stdout', "\n");
 
-    // cast result to an object for json_encode to ensure that an empty array 
becomes "{}" & send to fd/3
+    // send result to fd/3
     fwrite($fd3, $result . "\n");
 }
diff --git a/settings.gradle b/settings.gradle
index b5fbde6..cb22927 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -17,9 +17,9 @@
 
 include 'tests'
 
-include 'core:php8.0Action'
 include 'core:php8.1Action'
 include 'core:php8.2Action'
+include 'core:php8.3Action'
 
 rootProject.name = 'runtime-php'
 
diff --git 
a/tests/src/test/scala/runtime/actionContainers/Php80ActionContainerTests.scala 
b/tests/src/test/scala/runtime/actionContainers/Php83ActionContainerTests.scala
similarity index 88%
rename from 
tests/src/test/scala/runtime/actionContainers/Php80ActionContainerTests.scala
rename to 
tests/src/test/scala/runtime/actionContainers/Php83ActionContainerTests.scala
index 1235e51..c3620df 100644
--- 
a/tests/src/test/scala/runtime/actionContainers/Php80ActionContainerTests.scala
+++ 
b/tests/src/test/scala/runtime/actionContainers/Php83ActionContainerTests.scala
@@ -21,7 +21,7 @@ import org.junit.runner.RunWith
 import org.scalatest.junit.JUnitRunner
 
 @RunWith(classOf[JUnitRunner])
-class Php80ActionContainerTests extends Php7ActionContainerTests {
+class Php83ActionContainerTests extends Php7ActionContainerTests {
 
-  override lazy val phpContainerImageName = "action-php-v8.0"
+  override lazy val phpContainerImageName = "action-php-v8.3"
 }

Reply via email to