Skip to content

Commit 6e2657c

Browse files
Shikachuualexellis
authored andcommitted
Update PHP version everywhere to 7.4, changed composer flag to :1 to always use the most up-to-date composer:1 version.
Signed-off-by: Shikachuu <[email protected]>
1 parent cdef5a5 commit 6e2657c

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This repository contains the Classic OpenFaaS templates, but many more are avail
2323
| java11-vert-x | Java and [Vert.x](https://vertx.io/) | 11 | Debian GNU/Linux | of-watchdog | [Java LTS template](https://github.com/openfaas/templates/tree/master/template/java11-vert-x)
2424
| java11 | Java | 11 | Debian GNU/Linux | of-watchdog | [Java LTS template](https://github.com/openfaas/templates/tree/master/template/java11)
2525
| ruby | Ruby | 2.7 | Alpine Linux 3.11 | classic| [Ruby template](https://github.com/openfaas/templates/tree/master/template/ruby)
26-
| php7 | PHP | 7.2 | Alpine Linux | classic | [PHP 7 template](https://github.com/openfaas/templates/tree/master/template/php7)
26+
| php7 | PHP | 7.4 | Alpine Linux | classic | [PHP 7 template](https://github.com/openfaas/templates/tree/master/template/php7)
2727
| csharp | C# | N/A | Debian GNU/Linux 9 | classic | [C# template](https://github.com/openfaas/templates/tree/master/template/csharp)
2828

2929
For more information on the templates check out the [docs](https://docs.openfaas.com/cli/templates/).

template/php7/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ ARG BUILDPLATFORM
44
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.5 as watchdog
55

66
# start with the official Composer image and name it
7-
FROM --platform=${TARGETPLATFORM:-linux/amd64} composer:1.7 AS composer
7+
FROM --platform=${TARGETPLATFORM:-linux/amd64} composer:1 AS composer
88

99
# continue with the official PHP image
10-
FROM --platform=${TARGETPLATFORM:-linux/amd64} php:7.2-alpine
10+
FROM --platform=${TARGETPLATFORM:-linux/amd64} php:7.4-alpine
1111

1212
# copy the Composer PHAR from the Composer image into the PHP image
1313
COPY --from=composer /usr/bin/composer /usr/bin/composer

template/php7/function/src/Handler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
class Handler
1010
{
1111
/**
12-
* @param $data
13-
* @return
12+
* @param string $data
13+
* @return string
1414
*/
15-
public function handle($data)
15+
public function handle(string $data): string
1616
{
1717
return $data;
1818
}

template/php7/template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: php7
22
fprocess: php index.php
33
welcome_message: |
4-
You have created a new function which uses PHP 7.2.
4+
You have created a new function which uses PHP 7.4.
55
Dependencies and extensions can be added using the composer.json
66
and php-extension.sh files.
77
See https://github.com/openfaas/templates/blob/master/template/php7.

0 commit comments

Comments
 (0)