Skip to content

Commit bc94c2a

Browse files
authored
refactor(functions): declarative function signature for helloworld_http (GoogleCloudPlatform#1553)
1 parent 94b399b commit bc94c2a

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

functions/helloworld_http/SampleUnitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
2+
23
/**
34
* Copyright 2020 Google LLC.
45
*

functions/helloworld_http/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"require": {
3-
"google/cloud-functions-framework": "^1.0"
3+
"php": ">= 7.4",
4+
"google/cloud-functions-framework": "^1.1"
45
},
56
"scripts": {
67
"start": [

functions/helloworld_http/index.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@
1616
functions/helloworld_pubsub/composer.json
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"require": {
3-
"google/cloud-functions-framework": "^1.0.0"
3+
"cloudevents/sdk-php": "^1.0",
4+
"google/cloud-functions-framework": "^1.1"
45
},
56
"scripts": {
67
"start": [
78
"Composer\\Config::disableProcessTimeout",
8-
"FUNCTION_SIGNATURE_TYPE=cloudevent FUNCTION_TARGET=helloworldPubsub php -S localhost:${PORT:-8080} vendor/bin/router.php"
9+
"FUNCTION_TARGET=helloworldPubsub php -S localhost:${PORT:-8080} vendor/bin/router.php"
910
]
1011
},
1112
"require-dev": {

0 commit comments

Comments
 (0)