{"id":13545730,"url":"https://github.com/apache/openwhisk-runtime-php","last_synced_at":"2025-04-09T15:51:51.533Z","repository":{"id":38839585,"uuid":"105315541","full_name":"apache/openwhisk-runtime-php","owner":"apache","description":"Apache OpenWhisk Runtime PHP supports Apache OpenWhisk functions written in PHP","archived":false,"fork":false,"pushed_at":"2024-09-24T14:25:58.000Z","size":3234,"stargazers_count":40,"open_issues_count":2,"forks_count":33,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-07T20:21:27.597Z","etag":null,"topics":["apache","cloud","docker","faas","functions","functions-as-a-service","openwhisk","openwhisk-runtime","php","serverless","serverless-architectures","serverless-functions"],"latest_commit_sha":null,"homepage":"https://openwhisk.apache.org/","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-29T20:44:34.000Z","updated_at":"2025-03-31T04:07:22.000Z","dependencies_parsed_at":"2024-01-16T17:02:25.209Z","dependency_job_id":"a31e2a44-57ef-4070-9956-3e828793f7bc","html_url":"https://github.com/apache/openwhisk-runtime-php","commit_stats":{"total_commits":849,"total_committers":75,"mean_commits":11.32,"dds":0.8044758539458186,"last_synced_commit":"ca8a68313f466ed5f797594fda477b1437fcac8f"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/openwhisk-runtime-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248064071,"owners_count":21041854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache","cloud","docker","faas","functions","functions-as-a-service","openwhisk","openwhisk-runtime","php","serverless","serverless-architectures","serverless-functions"],"created_at":"2024-08-01T11:01:12.686Z","updated_at":"2025-04-09T15:51:51.507Z","avatar_url":"https://github.com/apache.png","language":"Scala","funding_links":[],"categories":["Scala"],"sub_categories":[],"readme":"\u003c!--\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n--\u003e\n\n# Apache OpenWhisk runtimes for PHP\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Continuous Integration](https://github.com/apache/openwhisk-runtime-php/actions/workflows/ci.yaml/badge.svg)](https://github.com/apache/openwhisk-runtime-php/actions/workflows/ci.yaml)\n\n## PHP versions\n\nThis runtime provides PHP 8.3, 8.2 and 8.1\n\n### Give it a try today\nTo use as a docker action\n\nPHP 8.3:\n```\nwsk action update myAction myAction.php --docker openwhisk/action-php-v8.3:latest\n```\n\nPHP 8.2:\n```\nwsk action update myAction myAction.php --docker openwhisk/action-php-v8.2:latest\n```\n\nPHP 8.1:\n```\nwsk action update myAction myAction.php --docker openwhisk/action-php-v8.1:latest\n```\n\nThis works on any deployment of Apache OpenWhisk\n\n### To use on deployment that contains the runtime as a kind\nTo use as a kind action\n\nPHP 8.3:\n```\nwsk action update myAction myAction.php --kind php:8.3\n```\n\nPHP 8.2:\n```\nwsk action update myAction myAction.php --kind php:8.2\n```\n\nPHP 8.1:\n```\nwsk action update myAction myAction.php --kind php:8.1\n```\n\n\n\n### Local development\n\n```\n./gradlew core:php8.3Action:distDocker\n./gradlew core:php8.2Action:distDocker\n./gradlew core:php8.1Action:distDocker\n```\nThis will produce the images `whisk/action-php-v8.3`, `whisk/action-php-v8.2` and `whisk/action-php-v8.1` respectively.\n\nBuild and Push image\n```\ndocker login\n./gradlew core:php8.3Action:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io\n./gradlew core:php8.2Action:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io\n./gradlew core:php8.1Action:distDocker -PdockerImagePrefix=$prefix-user -PdockerRegistry=docker.io\n```\n\nDeploy OpenWhisk using ansible environment that contains the kinds `php:8.3`, `php:8.2` and `php:8.1`\nAssuming you have OpenWhisk already deploy locally and `OPENWHISK_HOME` pointing to root directory of OpenWhisk core repository.\n\nSet `ROOTDIR` to the root directory of this repository.\n\nRedeploy OpenWhisk\n```\ncd $OPENWHISK_HOME/ansible\nANSIBLE_CMD=\"ansible-playbook -i ${ROOTDIR}/ansible/environments/local\"\n$ANSIBLE_CMD setup.yml\n$ANSIBLE_CMD couchdb.yml\n$ANSIBLE_CMD initdb.yml\n$ANSIBLE_CMD wipe.yml\n$ANSIBLE_CMD openwhisk.yml\n```\n\nOr you can use `wskdev` and create a soft link to the target ansible environment, for example:\n```\nln -s ${ROOTDIR}/ansible/environments/local ${OPENWHISK_HOME}/ansible/environments/local-php\nwskdev fresh -t local-php\n```\n\n\nTo use as docker action push to your own dockerhub account\n```\ndocker tag whisk/php8.2Action $user_prefix/action-php-v8.3\ndocker push $user_prefix/action-php-v8.3\n```\n```\ndocker tag whisk/php8.2Action $user_prefix/action-php-v8.2\ndocker push $user_prefix/action-php-v8.2\n```\n```\ndocker tag whisk/php8.1Action $user_prefix/action-php-v8.1\ndocker push $user_prefix/action-php-v8.1\n```\n\nThen create the action using your image from dockerhub\n```\nwsk action update myAction myAction.php --docker $user_prefix/action-php-v8.1\n```\nThe `$user_prefix` is usually your dockerhub user id.\n\n### Testing\nInstall dependencies from the root directory on $OPENWHISK_HOME repository\n```\n./gradlew install\n```\n\nUsing gradle for the ActionContainer tests you need to use a proxy if running on Mac, if Linux then don't use proxy options\nYou can pass the flags `-Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128` directly in gradle command.\nOr save in your `$HOME/.gradle/gradle.properties`\n```\nsystemProp.http.proxyHost=localhost\nsystemProp.http.proxyPort=3128\n```\nUsing gradle to run all tests\n```\n./gradlew :tests:test\n```\nUsing gradle to run some tests\n```\n./gradlew :tests:test --tests *ActionContainerTests*\n```\nUsing IntelliJ:\n- Import project as gradle project.\n- Make sure the working directory is root of the project/repo\n- Add the following Java VM properties in ScalaTests Run Configuration, easiest is to change the Defaults for all ScalaTests to use this VM properties\n```\n-Dhttp.proxyHost=localhost\n-Dhttp.proxyPort=3128\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fopenwhisk-runtime-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fopenwhisk-runtime-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fopenwhisk-runtime-php/lists"}