Skip to content

Commit 23d6a55

Browse files
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 <dgrove-oss@users.noreply.github.com> * Update core/php8.3Action/CHANGELOG.md Co-authored-by: David Grove <dgrove-oss@users.noreply.github.com> --------- Co-authored-by: David Grove <dgrove-oss@users.noreply.github.com>
1 parent d052626 commit 23d6a55

12 files changed

Lines changed: 50 additions & 62 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ jobs:
8888
working-directory: runtime
8989
run: |
9090
SHORT_COMMIT=$(git rev-parse --short "$GITHUB_SHA")
91-
./gradlew :core:php8.0Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=nightly
92-
./gradlew :core:php8.0Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=$SHORT_COMMIT
9391
./gradlew :core:php8.1Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=nightly
9492
./gradlew :core:php8.1Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=$SHORT_COMMIT
9593
./gradlew :core:php8.2Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=nightly
9694
./gradlew :core:php8.2Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=$SHORT_COMMIT
95+
./gradlew :core:php8.3Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=nightly
96+
./gradlew :core:php8.3Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=$SHORT_COMMIT
9797
- name: Push Release Images
9898
if: ${{ env.PUSH_RELEASE == 'true' }}
9999
working-directory: runtime

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,16 @@
2323

2424
## PHP versions
2525

26-
This runtime provides PHP 8.2, 8.1 and 8.0
26+
This runtime provides PHP 8.3, 8.2 and 8.1
2727

2828
### Give it a try today
2929
To use as a docker action
3030

31+
PHP 8.3:
32+
```
33+
wsk action update myAction myAction.php --docker openwhisk/action-php-v8.3:latest
34+
```
35+
3136
PHP 8.2:
3237
```
3338
wsk action update myAction myAction.php --docker openwhisk/action-php-v8.2:latest
@@ -38,16 +43,16 @@ PHP 8.1:
3843
wsk action update myAction myAction.php --docker openwhisk/action-php-v8.1:latest
3944
```
4045

41-
PHP 8.0:
42-
```
43-
wsk action update myAction myAction.php --docker openwhisk/action-php-v8.0:latest
44-
```
45-
4646
This works on any deployment of Apache OpenWhisk
4747

4848
### To use on deployment that contains the runtime as a kind
4949
To use as a kind action
5050

51+
PHP 8.3:
52+
```
53+
wsk action update myAction myAction.php --kind php:8.3
54+
```
55+
5156
PHP 8.2:
5257
```
5358
wsk action update myAction myAction.php --kind php:8.2
@@ -58,30 +63,26 @@ PHP 8.1:
5863
wsk action update myAction myAction.php --kind php:8.1
5964
```
6065

61-
PHP 8.0:
62-
```
63-
wsk action update myAction myAction.php --kind php:8.0
64-
```
6566

6667

6768
### Local development
6869

6970
```
71+
./gradlew core:php8.3Action:distDocker
7072
./gradlew core:php8.2Action:distDocker
7173
./gradlew core:php8.1Action:distDocker
72-
./gradlew core:php8.0Action:distDocker
7374
```
74-
This will produce the images `whisk/action-php-v8.2` and `whisk/action-php-v8.1`, `whisk/action-php-v8.0` respectively.
75+
This will produce the images `whisk/action-php-v8.3`, `whisk/action-php-v8.2` and `whisk/action-php-v8.1` respectively.
7576

7677
Build and Push image
7778
```
7879
docker login
80+
./gradlew core:php8.3Action:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io
7981
./gradlew core:php8.2Action:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io
8082
./gradlew core:php8.1Action:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io
81-
./gradlew core:php8.0Action:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io
8283
```
8384

84-
Deploy OpenWhisk using ansible environment that contains the kinds `php:8.2`, `php:8.1` and `php:8.0`
85+
Deploy OpenWhisk using ansible environment that contains the kinds `php:8.3`, `php:8.2` and `php:8.1`
8586
Assuming you have OpenWhisk already deploy locally and `OPENWHISK_HOME` pointing to root directory of OpenWhisk core repository.
8687

8788
Set `ROOTDIR` to the root directory of this repository.
@@ -106,21 +107,21 @@ wskdev fresh -t local-php
106107

107108
To use as docker action push to your own dockerhub account
108109
```
110+
docker tag whisk/php8.2Action $user_prefix/action-php-v8.3
111+
docker push $user_prefix/action-php-v8.3
112+
```
113+
```
109114
docker tag whisk/php8.2Action $user_prefix/action-php-v8.2
110115
docker push $user_prefix/action-php-v8.2
111116
```
112117
```
113118
docker tag whisk/php8.1Action $user_prefix/action-php-v8.1
114119
docker push $user_prefix/action-php-v8.1
115120
```
116-
```
117-
docker tag whisk/php8.0Action $user_prefix/action-php-v8.0
118-
docker push $user_prefix/action-php-v8.0
119-
```
120121

121122
Then create the action using your image from dockerhub
122123
```
123-
wsk action update myAction myAction.php --docker $user_prefix/action-php-v8.0
124+
wsk action update myAction myAction.php --docker $user_prefix/action-php-v8.1
124125
```
125126
The `$user_prefix` is usually your dockerhub user id.
126127

core/php8.0Action/composer.json

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,10 @@
1717
#
1818
-->
1919

20-
## Apache 1.19.0
21-
- No change
20+
## Initial Release
2221

23-
## Apache 1.18.0
24-
- Use php:8.0-cli-buster image to always pull latest patch version
25-
- Golang Action loop updatetd to golang 1.20
26-
- Support array result include sequence action (#120)
2722

28-
## Apache 1.17.0
29-
- Update version of PHP to 8.0.8
30-
- Build actionloop from 1.16@1.18.0 (#107)
31-
- Resolve akka versions explicitly. (#105, #104)
32-
33-
## Apache 1.16.0
34-
Initial release
35-
36-
- Added: PHP: 8.0.2
37-
- Used openwhisk-runtime-go 1.17.0 to build proxy
23+
- Added: PHP: 8.3.2
3824
- Added: PHP extensions in addition to the standard ones:
3925
- bcmath
4026
- curl
@@ -49,5 +35,5 @@ Initial release
4935
- zip
5036
- mongo
5137
- Added: Composer packages:
52-
- [guzzlehttp/guzzle](https://packagist.org/packages/guzzlehttp/guzzle): 7.2.0
53-
- [ramsey/uuid](https://packagist.org/packages/ramsey/uuid): 4.1.1
38+
- [guzzlehttp/guzzle](https://packagist.org/packages/guzzlehttp/guzzle): 7.8.1
39+
- [ramsey/uuid](https://packagist.org/packages/ramsey/uuid): 4.7.5
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN curl -sL \
3333
&& cd openwhisk-runtime-go-*/main\
3434
&& GO111MODULE=on CGO_ENABLED=0 go build -o /bin/proxy
3535

36-
FROM php:8.0-cli-buster
36+
FROM php:8.3-cli-bookworm
3737

3838
# select the builder to use
3939
ARG GO_PROXY_BUILD_FROM=release
@@ -45,10 +45,11 @@ RUN apt-get -y update \
4545
&& apt-get -y install --no-install-recommends \
4646
unzip \
4747
libfreetype6 \
48-
libicu63 \
48+
libicu72 \
4949
libjpeg62-turbo \
5050
libpng16-16 \
51-
libssl1.1 \
51+
libssl3 \
52+
libssl-dev \
5253
libxml2 \
5354
libzip4 \
5455
libpq5 \
@@ -60,7 +61,7 @@ RUN apt-get -y update \
6061
libssl-dev \
6162
libxml2-dev \
6263
libzip-dev \
63-
postgresql-server-dev-11 \
64+
postgresql-server-dev-15 \
6465
\
6566
&& docker-php-ext-install \
6667
bcmath \
@@ -74,19 +75,18 @@ RUN apt-get -y update \
7475
zip \
7576
\
7677
&& mkdir -p /usr/src/php/ext/mongodb \
77-
&& curl -fsSL https://pecl.php.net/get/mongodb-1.9.0RC1 | tar xvz -C "/usr/src/php/ext/mongodb" --strip 1 \
78+
&& curl -fsSL https://pecl.php.net/get/mongodb-1.14.0 | tar xvz -C "/usr/src/php/ext/mongodb" --strip 1 \
7879
&& docker-php-ext-install -j$(nproc) mongodb \
7980
\
8081
&& apt-get purge -y --auto-remove $PHPIZE_DEPS \
81-
&& apt-get purge -y --auto-remove libclang-common-7-dev clang-7 llvm-7 llvm-7-dev \
8282
&& apt-get purge -y --auto-remove libfreetype6-dev \
8383
libicu-dev \
8484
libjpeg-dev \
8585
libpng-dev \
8686
libssl-dev \
8787
libxml2-dev \
8888
libzip-dev \
89-
postgresql-server-dev-11 \
89+
postgresql-server-dev-15 \
9090
&& apt-get autoremove -y \
9191
&& apt-get clean -y \
9292
&& rm -rf /usr/src/php
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
* limitations under the License.
1616
*/
1717

18-
ext.dockerImageName = 'action-php-v8.0'
18+
ext.dockerImageName = 'action-php-v8.3'
1919
apply from: '../../gradle/docker.gradle'

core/php8.3Action/composer.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"config": {
3+
"platform": {
4+
"php": "8.3"
5+
}
6+
},
7+
"require": {
8+
"guzzlehttp/guzzle": "7.8.1",
9+
"ramsey/uuid": "4.7.5"
10+
}
11+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
file_put_contents('php://stdout', 'The action did not return a dictionary or array.');
7676
$result = (string)$result;
7777
} else {
78+
// cast result to an object for json_encode to ensure that an empty array becomes "{}
7879
$result = json_encode((object)$result);
7980
}
8081
} catch (Throwable $e) {
@@ -86,6 +87,6 @@
8687
file_put_contents('php://stderr', "\n");
8788
file_put_contents('php://stdout', "\n");
8889

89-
// cast result to an object for json_encode to ensure that an empty array becomes "{}" & send to fd/3
90+
// send result to fd/3
9091
fwrite($fd3, $result . "\n");
9192
}

0 commit comments

Comments
 (0)