You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/12/17 17:46:13 UTC

[GitHub] csantanapr closed pull request #4182: Add PHP 7.3 runtime

csantanapr closed pull request #4182: Add PHP 7.3 runtime
URL: https://github.com/apache/incubator-openwhisk/pull/4182
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ansible/files/runtimes.json b/ansible/files/runtimes.json
index 6a47db352c..fad64a3f5f 100644
--- a/ansible/files/runtimes.json
+++ b/ansible/files/runtimes.json
@@ -194,7 +194,7 @@
             },
             {
                 "kind": "php:7.2",
-                "default": true,
+                "default": false,
                 "deprecated": false,
                 "image": {
                     "prefix": "openwhisk",
@@ -205,6 +205,20 @@
                     "attachmentName": "codefile",
                     "attachmentType": "text/plain"
                 }
+            },
+            {
+                "kind": "php:7.3",
+                "default": true,
+                "deprecated": false,
+                "image": {
+                    "prefix": "openwhisk",
+                    "name": "action-php-v7.3",
+                    "tag": "latest"
+                },
+                "attached": {
+                    "attachmentName": "codefile",
+                    "attachmentType": "text/plain"
+                }
             }
         ],
         "ruby": [
diff --git a/core/controller/src/main/resources/apiv1swagger.json b/core/controller/src/main/resources/apiv1swagger.json
index 9596867e56..c61cbf3837 100644
--- a/core/controller/src/main/resources/apiv1swagger.json
+++ b/core/controller/src/main/resources/apiv1swagger.json
@@ -1895,6 +1895,7 @@
                         "nodejs:default",
                         "php:7.1",
                         "php:7.2",
+                        "php:7.3",
                         "python:2",
                         "python:3",
                         "python:default",
diff --git a/docs/actions-new.md b/docs/actions-new.md
index b51e483ff4..afbf13c240 100644
--- a/docs/actions-new.md
+++ b/docs/actions-new.md
@@ -64,7 +64,7 @@ additional rqeuirements and best practices:
 Actions when created specify the desired runtime for the function via a property called "kind".
 When using the `wsk` CLI, this is specified as `--kind <runtime-kind>`. The value is a typically
 a string describing the language (e.g., `nodejs`) followed by a colon and the version for the runtime
-as in `nodejs:8` or `php:7.2`.
+as in `nodejs:8` or `php:7.3`.
 
 The manifest is a map of runtime family names to an array of specific kinds. The details of the
 schema are found in the [Exec Manifest](../common/scala/src/main/scala/org/apache/openwhisk/core/entity/ExecManifest.scala).
diff --git a/docs/actions-php.md b/docs/actions-php.md
index 343dd2a2ec..b5a2fbbac8 100644
--- a/docs/actions-php.md
+++ b/docs/actions-php.md
@@ -23,10 +23,15 @@ The process of creating PHP actions is similar to that of [other actions](action
 The following sections guide you through creating and invoking a single PHP action,
 and demonstrate how to bundle multiple PHP files and third party dependencies.
 
-PHP actions are executed using PHP 7.2.6, with PHP 7.1.18 also available.
-To use the PHP 7.2 runtime, specify the `wsk` CLI parameter `--kind php:7.2` when creating or updating an action.
-This is the default when creating an action with file that has a `.php` extension.
-You can use `-- kind php:7.1 to use the PHP 7.1 runtime.
+PHP actions are executed using PHP 7.3. PHP 7.2 & PHP 7.1 are also available. The specific
+version of PHP is listed in the CHANGELOG files in the [PHP runtime repository](https://github.com/apache/incubator-openwhisk-runtime-php).
+
+To use a PHP runtime, specify the `wsk` CLI parameter `--kind` when creating or
+updating an action. The available PHP kinds are:
+
+* PHP 7.3: `--kind php:7.3`
+* PHP 7.2: `--kind php:7.2`
+* PHP 7.1: `--kind php:7.1`
 
 An action is simply a top-level PHP function. For example, create a file called `hello.php`
 with the following source code:
@@ -53,7 +58,7 @@ wsk action create helloPHP hello.php
 ```
 
 The CLI automatically infers the type of the action from the source file extension.
-For `.php` source files, the action runs using a PHP 7.2 runtime.
+For `.php` source files, the action runs using a PHP 7.3 runtime.
 
 Action invocation is the same for PHP actions as it is for [any other action](actions.md#the-basics).
 
@@ -101,8 +106,12 @@ The PHP runtime will automatically include Composer's autoloader for you, so you
 use the dependencies in your action code. Note that if you don't include your own `vendor` folder,
 then the runtime will include one for you with the following Composer packages:
 
-- guzzlehttp/guzzle       v6.3.3
-- ramsey/uuid             v3.7.3
+- guzzlehttp/guzzle
+- ramsey/uuid
+
+The specific versions of these packages depends on the PHP runtime in use and is listed in the
+CHANGELOG files in the [PHP runtime repository](https://github.com/apache/incubator-openwhisk-runtime-php).
+
 
 ## Built-in PHP extensions
 
diff --git a/tests/dat/actions/unicode.tests/php-7.3.txt b/tests/dat/actions/unicode.tests/php-7.3.txt
new file mode 100644
index 0000000000..bdd88cb6a7
--- /dev/null
+++ b/tests/dat/actions/unicode.tests/php-7.3.txt
@@ -0,0 +1,9 @@
+<?php
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
+function main(array $args) : array {
+    $str = $args['delimiter'] . " ☃ " . $args['delimiter'];
+    echo $str . "\n";
+    return  ["winter" => $str];
+}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services