From 6d4c545183d4c2eb9d89d981904b488c377acd4a Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 24 Nov 2021 18:04:16 -0500 Subject: [PATCH 01/20] chore: fix invoker docblock (#117) --- src/Invoker.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Invoker.php b/src/Invoker.php index d434a86b..a986d37b 100644 --- a/src/Invoker.php +++ b/src/Invoker.php @@ -29,18 +29,19 @@ class Invoker { private $function; private $errorLogFunc; - private static $registeredFunction = []; + private static $registeredFunctions = []; /** * @param array|string $target The callable to be invoked. * @param string|null $signatureType The signature type of the target callable, - * either "cloudevent" or "http". If null, - * env var `FUNCTION_SIGNATURE_TYPE` is used. + * either "cloudevent" or "http". This can be + * null if $target is registered using + * Invoker::registerFunction. */ public function __construct($target, ?string $signatureType = null) { - if (is_string($target) && isset(self::$registeredFunction[$target])) { - $this->function = self::$registeredFunction[$target]; + if (is_string($target) && isset(self::$registeredFunctions[$target])) { + $this->function = self::$registeredFunctions[$target]; } else { if (!is_callable($target)) { throw new InvalidArgumentException(sprintf( @@ -104,6 +105,6 @@ public function handle( */ public static function registerFunction(string $name, FunctionWrapper $function) { - self::$registeredFunction[$name] = $function; + self::$registeredFunctions[$name] = $function; } } From 41ab52514051df9976285fa788a7e7239dec7715 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 2 Dec 2021 13:31:55 -0500 Subject: [PATCH 02/20] feat: add class for testing (#119) --- src/FunctionsFrameworkTesting.php | 46 ++++++++++++++++++++++ tests/FunctionsFrameworkTest.php | 65 +++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 src/FunctionsFrameworkTesting.php create mode 100644 tests/FunctionsFrameworkTest.php diff --git a/src/FunctionsFrameworkTesting.php b/src/FunctionsFrameworkTesting.php new file mode 100644 index 00000000..08ee7fae --- /dev/null +++ b/src/FunctionsFrameworkTesting.php @@ -0,0 +1,46 @@ +getProperty('registeredFunctions'); + $registeredFunctionsReflection->setAccessible(true); + + $fn = $registeredFunctionsReflection->getValue()[$functionName] ?? null; + + if ($fn) { + $functionReflection = (new ReflectionClass($fn)) + ->getProperty('function'); + $functionReflection->setAccessible(true); + + return $functionReflection->getValue($fn); + } + } +} diff --git a/tests/FunctionsFrameworkTest.php b/tests/FunctionsFrameworkTest.php new file mode 100644 index 00000000..63907543 --- /dev/null +++ b/tests/FunctionsFrameworkTest.php @@ -0,0 +1,65 @@ +assertEquals( + $fn, + FunctionsFrameworkTesting::getRegisteredFunction('testFn') + ); + } + + public function testRegisterAndRetrieveCloudEventFunction(): void + { + $fn = function (CloudEventInterface $event) { + return "this is a test function"; + }; + + FunctionsFramework::cloudEvent('testFn', $fn); + + $this->assertEquals( + $fn, + FunctionsFrameworkTesting::getRegisteredFunction('testFn') + ); + } + + public function testRetrieveNonexistantFunction(): void + { + $this->assertNull( + FunctionsFrameworkTesting::getRegisteredFunction('thisDoesntExist') + ); + } +} From c693c8c77166fab1fa88a8d47d3fb60768dc3c11 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 2 Dec 2021 16:29:56 -0500 Subject: [PATCH 03/20] chore: switch master to main (#121) --- .github/workflows/conformance.yml | 8 +++----- .github/workflows/lint.yaml | 2 +- .github/workflows/unit.yaml | 2 +- README.md | 2 +- src/LegacyEventMapper.php | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index adfcbdd0..bf5c2780 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -1,11 +1,9 @@ name: PHP Conformance CI on: - pull_request: - branches: - - master push: branches: - - master + - main + pull_request: workflow_dispatch: jobs: build: @@ -81,4 +79,4 @@ jobs: functionType: 'cloudevent' useBuildpacks: false validateMapping: true - cmd: "'php -S localhost:8080 router.php'" \ No newline at end of file + cmd: "'php -S localhost:8080 router.php'" diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 4973c9aa..9efdb37e 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -2,7 +2,7 @@ name: PHP Lint CI on: push: branches: - - master + - main pull_request: jobs: php-cs-fixer: diff --git a/.github/workflows/unit.yaml b/.github/workflows/unit.yaml index 56ba817f..2b99351b 100644 --- a/.github/workflows/unit.yaml +++ b/.github/workflows/unit.yaml @@ -2,7 +2,7 @@ name: PHP Unit CI on: push: branches: - - master + - main pull_request: jobs: build: diff --git a/README.md b/README.md index 6f097b4b..78362738 100644 --- a/README.md +++ b/README.md @@ -196,7 +196,7 @@ gcloud run deploy my-cloud-function \ After your instance deploys, you can access it at the URL provided, or view it in the [Cloud Console][cloud-run-console]. -[functions-samples]: https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/functions +[functions-samples]: https://github.com/GoogleCloudPlatform/php-docs-samples/tree/main/functions [functions-how-to]: https://cloud.google.com/functions/docs/how-to [gcloud]: https://cloud.google.com/sdk/gcloud/ [gcloud-auth]: https://cloud.google.com/sdk/docs/authorizing diff --git a/src/LegacyEventMapper.php b/src/LegacyEventMapper.php index 3dc225d9..77f57a2a 100644 --- a/src/LegacyEventMapper.php +++ b/src/LegacyEventMapper.php @@ -23,7 +23,7 @@ class LegacyEventMapper { // Maps background/legacy event types to their equivalent CloudEvent types. // For more info on event mappings see - // https://github.com/GoogleCloudPlatform/functions-framework-conformance/blob/master/docs/mapping.md + // https://github.com/GoogleCloudPlatform/functions-framework-conformance/blob/main/docs/mapping.md private static $ceTypeMap = [ 'google.pubsub.topic.publish' => 'google.cloud.pubsub.topic.v1.messagePublished', 'providers/cloud.pubsub/eventTypes/topic.publish' => 'google.cloud.pubsub.topic.v1.messagePublished', From a20f9dfb905a77f79cc526aa0c126e6df028be2c Mon Sep 17 00:00:00 2001 From: Grant Timmerman <744973+grant@users.noreply.github.com> Date: Thu, 9 Dec 2021 18:21:10 -0800 Subject: [PATCH 04/20] docs: update badges (#122) --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 78362738..76c862ae 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Functions Framework for PHP [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FGoogleCloudPlatform%2Ffunctions-framework-php%2Fbadge&style=flat)](https://actions-badge.atrox.dev/GoogleCloudPlatform/functions-framework-php/goto) [![Packagist](https://poser.pugx.org/google/cloud-functions-framework/v/stable)](https://packagist.org/packages/google/cloud-functions-framework) +# Functions Framework for PHP [![Packagist](https://poser.pugx.org/google/cloud-functions-framework/v/stable)](https://packagist.org/packages/google/cloud-functions-framework) + +[![PHP unit CI][ff_php_unit_img]][ff_php_unit_link] [![PHP lint CI][ff_php_lint_img]][ff_php_lint_link] [![PHP conformace CI][ff_php_conformance_img]][ff_php_conformance_link] An open source FaaS (Function as a service) framework for writing portable PHP functions. @@ -368,3 +370,10 @@ You can configure the Functions Framework using the environment variables shown Contributions to this library are welcome and encouraged. See [CONTRIBUTING](CONTRIBUTING.md) for more information on how to get started. + +[ff_php_unit_img]: https://github.com/GoogleCloudPlatform/functions-framework-php/workflows/PHP%20Unit%20CI/badge.svg +[ff_php_unit_link]: https://github.com/GoogleCloudPlatform/functions-framework-php/actions?query=workflow%3A"PHP+Unit+CI" +[ff_php_lint_img]: https://github.com/GoogleCloudPlatform/functions-framework-php/workflows/PHP%20Lint%20CI/badge.svg +[ff_php_lint_link]: https://github.com/GoogleCloudPlatform/functions-framework-php/actions?query=workflow%3A"PHP+Lint+CI" +[ff_php_conformance_img]: https://github.com/GoogleCloudPlatform/functions-framework-php/workflows/PHP%20Conformance%20CI/badge.svg +[ff_php_conformance_link]: https://github.com/GoogleCloudPlatform/functions-framework-php/actions?query=workflow%3A"PHP+Conformance+CI" From 4348c99796c97c68898561d25f3634ef7fb6ba6a Mon Sep 17 00:00:00 2001 From: Montgomery Carter Date: Mon, 28 Feb 2022 15:17:09 -0800 Subject: [PATCH 05/20] ci: Add 8.1 to versions to be tested (#124) * Add php 8.1 to the list of versions to be tested in github workflows. * Add php 8.1 to the list of versions to be tested in github workflows. Fix typo --- .github/workflows/conformance.yml | 2 +- .github/workflows/unit.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index bf5c2780..3c1bc4eb 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: [ '7.4','8.0' ] + php-version: [ '7.4','8.0','8.1' ] name: PHP ${{ matrix.php-version }} Conformance Test steps: - name: Checkout code diff --git a/.github/workflows/unit.yaml b/.github/workflows/unit.yaml index 2b99351b..b9edbe6e 100644 --- a/.github/workflows/unit.yaml +++ b/.github/workflows/unit.yaml @@ -10,7 +10,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: [ '7.4','8.0' ] + php-versions: [ '7.4','8.0','8.1' ] name: PHP ${{ matrix.php-versions }} Unit Test steps: - name: Checkout @@ -26,4 +26,4 @@ jobs: max_attempts: 3 command: composer install - name: Run Script - run: vendor/bin/phpunit \ No newline at end of file + run: vendor/bin/phpunit From 0ed7e22cd2b1e088f92ab8eace18fb8c206e50bc Mon Sep 17 00:00:00 2001 From: Bramus! Date: Wed, 2 Mar 2022 19:21:30 +0100 Subject: [PATCH 06/20] docs: fix CloudEvents example (#123) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 76c862ae..ce5b4a87 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ cloudevent function signature: ```php use Google\CloudFunctions\CloudEvent; -function helloCloudEvents(CloudEvent $cloudevent) +function helloCloudEvent(CloudEvent $cloudevent) { // Print the whole CloudEvent $stdout = fopen('php://stdout', 'wb'); From 2da1fa3ef34f632aa4179adef830972a5223b572 Mon Sep 17 00:00:00 2001 From: Annie Fu Date: Tue, 21 Jun 2022 14:46:11 -0700 Subject: [PATCH 07/20] chore: add GCF buildpack integration test Workflow See [functions-framework-conformance builidpack integration workflow PR](https://github.com/GoogleCloudPlatform/functions-framework-conformance/pull/99) for more information. Also, move the script for running conformance tests locally to the conformance test directory. --- .../workflows/buildpack-integration-test.yml | 19 +++++++++++++ function_output.json | 1 + tests/conformance/prerun.sh | 27 +++++++++++++++++++ .../conformance/run_conformance_tests.sh | 6 +++++ 4 files changed, 53 insertions(+) create mode 100644 .github/workflows/buildpack-integration-test.yml create mode 100644 function_output.json create mode 100755 tests/conformance/prerun.sh rename run_conformance_tests.sh => tests/conformance/run_conformance_tests.sh (96%) diff --git a/.github/workflows/buildpack-integration-test.yml b/.github/workflows/buildpack-integration-test.yml new file mode 100644 index 00000000..b2e94344 --- /dev/null +++ b/.github/workflows/buildpack-integration-test.yml @@ -0,0 +1,19 @@ +# Validates Functions Framework with GCF buildpacks. +name: Buildpack Integration Test +on: + push: + branches: + - main + workflow_dispatch: +jobs: + php74-buildpack-test: + uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@v1.4.1 + with: + http-builder-source: 'tests/conformance' + http-builder-target: 'declarativeHttpFunc' + cloudevent-builder-source: 'tests/conformance' + cloudevent-builder-target: 'declarativeCloudEvent' + prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' + builder-runtime: 'php74' + # Latest uploaded tag from us.gcr.io/fn-img/buildpacks/php74/builder + builder-tag: 'php74_20220620_7_4_29_RC00' \ No newline at end of file diff --git a/function_output.json b/function_output.json new file mode 100644 index 00000000..6c568152 --- /dev/null +++ b/function_output.json @@ -0,0 +1 @@ +{"id":"aaaaaa-1111-bbbb-2222-cccccccccccc","source":"\/\/storage.googleapis.com\/projects\/_\/buckets\/some-bucket","specversion":"1.0","type":"google.cloud.storage.object.v1.finalized","datacontenttype":"application\/json","dataschema":null,"subject":"objects\/folder\/Test.cs","time":"2020-09-29T11:32:00.123Z","data":{"bucket":"some-bucket","contentType":"text\/plain","crc32c":"rTVTeQ==","etag":"CNHZkbuF\/ugCEAE=","generation":"1587627537231057","id":"some-bucket\/folder\/Test.cs\/1587627537231057","kind":"storage#object","md5Hash":"kF8MuJ5+CTJxvyhHS1xzRg==","mediaLink":"https:\/\/www.googleapis.com\/download\/storage\/v1\/b\/some-bucket\/o\/folder%2FTest.cs?generation=1587627537231057&alt=media","metageneration":"1","name":"folder\/Test.cs","selfLink":"https:\/\/www.googleapis.com\/storage\/v1\/b\/some-bucket\/o\/folder\/Test.cs","size":"352","storageClass":"MULTI_REGIONAL","timeCreated":"2020-04-23T07:38:57.230Z","timeStorageClassUpdated":"2020-04-23T07:38:57.230Z","updated":"2020-04-23T07:38:57.230Z"}} \ No newline at end of file diff --git a/tests/conformance/prerun.sh b/tests/conformance/prerun.sh new file mode 100755 index 00000000..69186fc2 --- /dev/null +++ b/tests/conformance/prerun.sh @@ -0,0 +1,27 @@ +# prerun.sh sets up the test function to use the functions framework commit +# specified by generating a `composer.json`. This makes the function `pack` buildable +# with GCF buildpacks. +# +# `pack` build example command: +# pack build myfn --builder us.gcr.io/fn-img/buildpacks/php74/builder:php74_20220620_7_4_29_RC00 --env GOOGLE_RUNTIME=php74 --env GOOGLE_FUNCTION_TARGET=declarativeHttpFunc --env X_GOOGLE_TARGET_PLATFORM=gcf +FRAMEWORK_VERSION=$1 + +# exit when any command fails +set -e + +cd $(dirname $0) + +if [ -z "${FRAMEWORK_VERSION}" ] + then + echo "Functions Framework version required as first parameter" + exit 1 +fi + +echo '{ + "require": { + "google/cloud-functions-framework": "dev-main#'${FRAMEWORK_VERSION}'", + "cloudevents/sdk-php": "^1.0" + } +}' > composer.json + +cat composer.json \ No newline at end of file diff --git a/run_conformance_tests.sh b/tests/conformance/run_conformance_tests.sh similarity index 96% rename from run_conformance_tests.sh rename to tests/conformance/run_conformance_tests.sh index bb284371..9fd74f62 100755 --- a/run_conformance_tests.sh +++ b/tests/conformance/run_conformance_tests.sh @@ -14,6 +14,12 @@ # Defaults to the latest version of the repo, which may be ahead of the # latest release. +# exit when any command fails +set -e + +# Change into the repo root +cd $(dirname $0)/../.. + CLIENT_VERSION=$1 if [ $CLIENT_VERSION ]; then CLIENT_VERSION="@$CLIENT_VERSION" From caff4321e38ac14cb158f3e2f01786609518ecd7 Mon Sep 17 00:00:00 2001 From: Annie Fu <16651409+anniefu@users.noreply.github.com> Date: Tue, 21 Jun 2022 15:07:36 -0700 Subject: [PATCH 08/20] Revert "chore: add GCF buildpack integration test Workflow" (#128) This reverts commit 2da1fa3ef34f632aa4179adef830972a5223b572. --- .../workflows/buildpack-integration-test.yml | 19 ------------- function_output.json | 1 - ...mance_tests.sh => run_conformance_tests.sh | 6 ----- tests/conformance/prerun.sh | 27 ------------------- 4 files changed, 53 deletions(-) delete mode 100644 .github/workflows/buildpack-integration-test.yml delete mode 100644 function_output.json rename tests/conformance/run_conformance_tests.sh => run_conformance_tests.sh (96%) delete mode 100755 tests/conformance/prerun.sh diff --git a/.github/workflows/buildpack-integration-test.yml b/.github/workflows/buildpack-integration-test.yml deleted file mode 100644 index b2e94344..00000000 --- a/.github/workflows/buildpack-integration-test.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Validates Functions Framework with GCF buildpacks. -name: Buildpack Integration Test -on: - push: - branches: - - main - workflow_dispatch: -jobs: - php74-buildpack-test: - uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@v1.4.1 - with: - http-builder-source: 'tests/conformance' - http-builder-target: 'declarativeHttpFunc' - cloudevent-builder-source: 'tests/conformance' - cloudevent-builder-target: 'declarativeCloudEvent' - prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' - builder-runtime: 'php74' - # Latest uploaded tag from us.gcr.io/fn-img/buildpacks/php74/builder - builder-tag: 'php74_20220620_7_4_29_RC00' \ No newline at end of file diff --git a/function_output.json b/function_output.json deleted file mode 100644 index 6c568152..00000000 --- a/function_output.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"aaaaaa-1111-bbbb-2222-cccccccccccc","source":"\/\/storage.googleapis.com\/projects\/_\/buckets\/some-bucket","specversion":"1.0","type":"google.cloud.storage.object.v1.finalized","datacontenttype":"application\/json","dataschema":null,"subject":"objects\/folder\/Test.cs","time":"2020-09-29T11:32:00.123Z","data":{"bucket":"some-bucket","contentType":"text\/plain","crc32c":"rTVTeQ==","etag":"CNHZkbuF\/ugCEAE=","generation":"1587627537231057","id":"some-bucket\/folder\/Test.cs\/1587627537231057","kind":"storage#object","md5Hash":"kF8MuJ5+CTJxvyhHS1xzRg==","mediaLink":"https:\/\/www.googleapis.com\/download\/storage\/v1\/b\/some-bucket\/o\/folder%2FTest.cs?generation=1587627537231057&alt=media","metageneration":"1","name":"folder\/Test.cs","selfLink":"https:\/\/www.googleapis.com\/storage\/v1\/b\/some-bucket\/o\/folder\/Test.cs","size":"352","storageClass":"MULTI_REGIONAL","timeCreated":"2020-04-23T07:38:57.230Z","timeStorageClassUpdated":"2020-04-23T07:38:57.230Z","updated":"2020-04-23T07:38:57.230Z"}} \ No newline at end of file diff --git a/tests/conformance/run_conformance_tests.sh b/run_conformance_tests.sh similarity index 96% rename from tests/conformance/run_conformance_tests.sh rename to run_conformance_tests.sh index 9fd74f62..bb284371 100755 --- a/tests/conformance/run_conformance_tests.sh +++ b/run_conformance_tests.sh @@ -14,12 +14,6 @@ # Defaults to the latest version of the repo, which may be ahead of the # latest release. -# exit when any command fails -set -e - -# Change into the repo root -cd $(dirname $0)/../.. - CLIENT_VERSION=$1 if [ $CLIENT_VERSION ]; then CLIENT_VERSION="@$CLIENT_VERSION" diff --git a/tests/conformance/prerun.sh b/tests/conformance/prerun.sh deleted file mode 100755 index 69186fc2..00000000 --- a/tests/conformance/prerun.sh +++ /dev/null @@ -1,27 +0,0 @@ -# prerun.sh sets up the test function to use the functions framework commit -# specified by generating a `composer.json`. This makes the function `pack` buildable -# with GCF buildpacks. -# -# `pack` build example command: -# pack build myfn --builder us.gcr.io/fn-img/buildpacks/php74/builder:php74_20220620_7_4_29_RC00 --env GOOGLE_RUNTIME=php74 --env GOOGLE_FUNCTION_TARGET=declarativeHttpFunc --env X_GOOGLE_TARGET_PLATFORM=gcf -FRAMEWORK_VERSION=$1 - -# exit when any command fails -set -e - -cd $(dirname $0) - -if [ -z "${FRAMEWORK_VERSION}" ] - then - echo "Functions Framework version required as first parameter" - exit 1 -fi - -echo '{ - "require": { - "google/cloud-functions-framework": "dev-main#'${FRAMEWORK_VERSION}'", - "cloudevents/sdk-php": "^1.0" - } -}' > composer.json - -cat composer.json \ No newline at end of file From d5c3589012e2daeba963576eaf3748a7b4622b0f Mon Sep 17 00:00:00 2001 From: Annie Fu <16651409+anniefu@users.noreply.github.com> Date: Fri, 24 Jun 2022 10:13:41 -0700 Subject: [PATCH 09/20] chore: use Release Please for releases (#126) Add a CHANGELOG.md file that the Release Please App can update. --- .github/release-please.yml | 2 ++ CHANGELOG.md | 0 2 files changed, 2 insertions(+) create mode 100644 .github/release-please.yml create mode 100644 CHANGELOG.md diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 00000000..34e8f816 --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,2 @@ +releaseType: php +handleGHRelease: true \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..e69de29b From 8db2c426cd0c0e4ae32abfe62b2dbf9f73b0b013 Mon Sep 17 00:00:00 2001 From: Annie Fu <16651409+anniefu@users.noreply.github.com> Date: Fri, 24 Jun 2022 11:10:48 -0700 Subject: [PATCH 10/20] chore: add GCF buildpack integration test Workflow (#129) See [functions-framework-conformance builidpack integration workflow PR](https://github.com/GoogleCloudPlatform/functions-framework-conformance/pull/99) for more information. Also, move the script for running conformance tests locally to the conformance test directory. --- .../workflows/buildpack-integration-test.yml | 32 +++++++++++++++++++ tests/conformance/prerun.sh | 27 ++++++++++++++++ .../conformance/run_conformance_tests.sh | 6 ++++ 3 files changed, 65 insertions(+) create mode 100644 .github/workflows/buildpack-integration-test.yml create mode 100755 tests/conformance/prerun.sh rename run_conformance_tests.sh => tests/conformance/run_conformance_tests.sh (96%) diff --git a/.github/workflows/buildpack-integration-test.yml b/.github/workflows/buildpack-integration-test.yml new file mode 100644 index 00000000..a46cd2d4 --- /dev/null +++ b/.github/workflows/buildpack-integration-test.yml @@ -0,0 +1,32 @@ +# Validates Functions Framework with GCF buildpacks. +name: Buildpack Integration Test +on: + push: + branches: + - main + workflow_dispatch: +jobs: + php74-buildpack-test: + uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@v1.5.4 + with: + http-builder-source: 'tests/conformance' + http-builder-target: 'declarativeHttpFunc' + cloudevent-builder-source: 'tests/conformance' + cloudevent-builder-target: 'declarativeCloudEventFunc' + prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' + output-file: 'vendor/bin/function_output.json' + builder-runtime: 'php74' + # Latest uploaded tag from us.gcr.io/fn-img/buildpacks/php74/builder + builder-tag: 'php74_20220620_7_4_29_RC00' + php81-buildpack-test: + uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@v1.5.4 + with: + http-builder-source: 'tests/conformance' + http-builder-target: 'declarativeHttpFunc' + cloudevent-builder-source: 'tests/conformance' + cloudevent-builder-target: 'declarativeCloudEventFunc' + prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' + output-file: 'vendor/bin/function_output.json' + builder-runtime: 'php81' + # Latest uploaded tag from us.gcr.io/fn-img/buildpacks/php81/builder + builder-tag: 'php81_20220620_8_1_6_RC00' diff --git a/tests/conformance/prerun.sh b/tests/conformance/prerun.sh new file mode 100755 index 00000000..69186fc2 --- /dev/null +++ b/tests/conformance/prerun.sh @@ -0,0 +1,27 @@ +# prerun.sh sets up the test function to use the functions framework commit +# specified by generating a `composer.json`. This makes the function `pack` buildable +# with GCF buildpacks. +# +# `pack` build example command: +# pack build myfn --builder us.gcr.io/fn-img/buildpacks/php74/builder:php74_20220620_7_4_29_RC00 --env GOOGLE_RUNTIME=php74 --env GOOGLE_FUNCTION_TARGET=declarativeHttpFunc --env X_GOOGLE_TARGET_PLATFORM=gcf +FRAMEWORK_VERSION=$1 + +# exit when any command fails +set -e + +cd $(dirname $0) + +if [ -z "${FRAMEWORK_VERSION}" ] + then + echo "Functions Framework version required as first parameter" + exit 1 +fi + +echo '{ + "require": { + "google/cloud-functions-framework": "dev-main#'${FRAMEWORK_VERSION}'", + "cloudevents/sdk-php": "^1.0" + } +}' > composer.json + +cat composer.json \ No newline at end of file diff --git a/run_conformance_tests.sh b/tests/conformance/run_conformance_tests.sh similarity index 96% rename from run_conformance_tests.sh rename to tests/conformance/run_conformance_tests.sh index bb284371..9fd74f62 100755 --- a/run_conformance_tests.sh +++ b/tests/conformance/run_conformance_tests.sh @@ -14,6 +14,12 @@ # Defaults to the latest version of the repo, which may be ahead of the # latest release. +# exit when any command fails +set -e + +# Change into the repo root +cd $(dirname $0)/../.. + CLIENT_VERSION=$1 if [ $CLIENT_VERSION ]; then CLIENT_VERSION="@$CLIENT_VERSION" From e66d6f20b166f5ae9d216051aacdc7f39815568a Mon Sep 17 00:00:00 2001 From: Annie Fu <16651409+anniefu@users.noreply.github.com> Date: Mon, 7 Nov 2022 15:15:23 -0800 Subject: [PATCH 11/20] chore: update buildpack integration test (#132) Newest version of the client does not require a builder-tag and will use "latest" by default. --- .github/workflows/buildpack-integration-test.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/buildpack-integration-test.yml b/.github/workflows/buildpack-integration-test.yml index a46cd2d4..27db75ea 100644 --- a/.github/workflows/buildpack-integration-test.yml +++ b/.github/workflows/buildpack-integration-test.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: jobs: php74-buildpack-test: - uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@v1.5.4 + uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@v1.8.0 with: http-builder-source: 'tests/conformance' http-builder-target: 'declarativeHttpFunc' @@ -16,10 +16,8 @@ jobs: prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' output-file: 'vendor/bin/function_output.json' builder-runtime: 'php74' - # Latest uploaded tag from us.gcr.io/fn-img/buildpacks/php74/builder - builder-tag: 'php74_20220620_7_4_29_RC00' php81-buildpack-test: - uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@v1.5.4 + uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@v1.8.0 with: http-builder-source: 'tests/conformance' http-builder-target: 'declarativeHttpFunc' @@ -28,5 +26,3 @@ jobs: prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' output-file: 'vendor/bin/function_output.json' builder-runtime: 'php81' - # Latest uploaded tag from us.gcr.io/fn-img/buildpacks/php81/builder - builder-tag: 'php81_20220620_8_1_6_RC00' From a482dda7017043ca41eefa6d4966fff8e8b08cff Mon Sep 17 00:00:00 2001 From: Kenneth Rosario Date: Wed, 8 Feb 2023 12:51:49 -0800 Subject: [PATCH 12/20] chore: configure security scorecard action (#134) --- .github/workflows/scorecard.yml | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/scorecard.yml diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 00000000..d0260b41 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,47 @@ +name: Scorecard supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '0 */12 * * *' # runs every 12 hours + push: + branches: [ "main" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Needed to publish results and get a badge (see publish_results below). + id-token: write + + steps: + - name: "Checkout code" + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6 + with: + results_file: results.sarif + results_format: sarif + # Public repositories: + # - Publish results to OpenSSF REST API for easy access by consumers + # - Allows the repository to include the Scorecard badge. + # - See https://github.com/ossf/scorecard-action#publishing-results. + publish_results: true + + # Upload the results to GitHub's code scanning dashboard. + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@807578363a7869ca324a79039e6db9c843e0e100 # v2.1.27 + with: + sarif_file: results.sarif From 0caaa7b33c4c82f537ddc77b71ec6fbb13e2c2c1 Mon Sep 17 00:00:00 2001 From: Paul Feng <35683264+paul-feng-github@users.noreply.github.com> Date: Tue, 7 Mar 2023 16:00:54 -0800 Subject: [PATCH 13/20] test: Add tests for php82 (#135) --- .github/workflows/buildpack-integration-test.yml | 10 ++++++++++ .github/workflows/conformance.yml | 2 +- .github/workflows/unit.yaml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildpack-integration-test.yml b/.github/workflows/buildpack-integration-test.yml index 27db75ea..07b4f17c 100644 --- a/.github/workflows/buildpack-integration-test.yml +++ b/.github/workflows/buildpack-integration-test.yml @@ -26,3 +26,13 @@ jobs: prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' output-file: 'vendor/bin/function_output.json' builder-runtime: 'php81' + php82-buildpack-test: + uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@v1.8.0 + with: + http-builder-source: 'tests/conformance' + http-builder-target: 'declarativeHttpFunc' + cloudevent-builder-source: 'tests/conformance' + cloudevent-builder-target: 'declarativeCloudEventFunc' + prerun: 'tests/conformance/prerun.sh ${{ github.sha }}' + output-file: 'vendor/bin/function_output.json' + builder-runtime: 'php82' \ No newline at end of file diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 3c1bc4eb..1beebfd4 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: [ '7.4','8.0','8.1' ] + php-version: [ '7.4','8.0','8.1','8.2' ] name: PHP ${{ matrix.php-version }} Conformance Test steps: - name: Checkout code diff --git a/.github/workflows/unit.yaml b/.github/workflows/unit.yaml index b9edbe6e..a56a2a48 100644 --- a/.github/workflows/unit.yaml +++ b/.github/workflows/unit.yaml @@ -10,7 +10,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: [ '7.4','8.0','8.1' ] + php-versions: [ '7.4','8.0','8.1','8.2' ] name: PHP ${{ matrix.php-versions }} Unit Test steps: - name: Checkout From 360b7d6605077f2977539e9d8b3455df44847ad3 Mon Sep 17 00:00:00 2001 From: Chi Zhang Date: Mon, 27 Mar 2023 16:08:47 -0700 Subject: [PATCH 14/20] chore: Rename unit.yaml to unit.yml (#136) --- .github/workflows/{unit.yaml => unit.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{unit.yaml => unit.yml} (100%) diff --git a/.github/workflows/unit.yaml b/.github/workflows/unit.yml similarity index 100% rename from .github/workflows/unit.yaml rename to .github/workflows/unit.yml From ed6afaad643862d9a0912ca2539fa4f1de0c4ecc Mon Sep 17 00:00:00 2001 From: StepSecurity Bot Date: Tue, 4 Apr 2023 16:55:31 -0700 Subject: [PATCH 15/20] chore: [StepSecurity] Apply security best practices (#137) --- .github/workflows/conformance.yml | 21 +++++++++++-------- .github/workflows/dependency-review.yml | 27 +++++++++++++++++++++++++ .github/workflows/lint.yaml | 12 +++++++++-- .github/workflows/scorecard.yml | 5 +++++ .github/workflows/unit.yml | 14 ++++++++++--- 5 files changed, 66 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/dependency-review.yml diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 1beebfd4..5ab515d6 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -13,28 +13,33 @@ jobs: php-version: [ '7.4','8.0','8.1','8.2' ] name: PHP ${{ matrix.php-version }} Conformance Test steps: + - name: Harden Runner + uses: step-security/harden-runner@03bee3930647ebbf994244c21ddbc0d4933aab4f # v2.3.0 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - name: Setup PHP ${{ matrix.php-version }} - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2 with: php-version: ${{ matrix.php-version }} - name: Install Dependencies - uses: nick-invision/retry@v1 + uses: nick-invision/retry@39da88d5f7d15a96aed861dbabbe8b7443e3182a # v1.0.4 with: timeout_minutes: 10 max_attempts: 3 command: composer install - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2.2.0 with: go-version: '1.15' - name: Run HTTP conformance tests - uses: GoogleCloudPlatform/functions-framework-conformance/action@v1.2.1 + uses: GoogleCloudPlatform/functions-framework-conformance/action@e42b1533877f1b639f508ec7fbcfb5be31aca663 # v1.2.1 env: FUNCTION_TARGET: 'httpFunc' FUNCTION_SIGNATURE_TYPE: 'http' @@ -46,7 +51,7 @@ jobs: cmd: "'php -S localhost:8080 router.php'" - name: Run Declarative HTTP conformance tests - uses: GoogleCloudPlatform/functions-framework-conformance/action@v1.2.1 + uses: GoogleCloudPlatform/functions-framework-conformance/action@e42b1533877f1b639f508ec7fbcfb5be31aca663 # v1.2.1 env: FUNCTION_TARGET: 'declarativeHttpFunc' FUNCTION_SOURCE: ${{ github.workspace }}/tests/conformance/index.php @@ -57,7 +62,7 @@ jobs: cmd: "'php -S localhost:8080 router.php'" - name: Run CloudEvent conformance tests - uses: GoogleCloudPlatform/functions-framework-conformance/action@v1.2.1 + uses: GoogleCloudPlatform/functions-framework-conformance/action@e42b1533877f1b639f508ec7fbcfb5be31aca663 # v1.2.1 env: FUNCTION_TARGET: 'cloudEventFunc' FUNCTION_SIGNATURE_TYPE: 'cloudevent' @@ -70,7 +75,7 @@ jobs: cmd: "'php -S localhost:8080 router.php'" - name: Run Declarative CloudEvent conformance tests - uses: GoogleCloudPlatform/functions-framework-conformance/action@v1.2.1 + uses: GoogleCloudPlatform/functions-framework-conformance/action@e42b1533877f1b639f508ec7fbcfb5be31aca663 # v1.2.1 env: FUNCTION_TARGET: 'declarativeCloudEventFunc' FUNCTION_SOURCE: ${{ github.workspace }}/tests/conformance/index.php diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 00000000..033fd439 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,27 @@ +# Dependency Review Action +# +# This Action will scan dependency manifest files that change as part of a Pull Request, +# surfacing known-vulnerable versions of the packages declared or updated in the PR. +# Once installed, if the workflow run is marked as required, +# PRs introducing known-vulnerable packages will be blocked from merging. +# +# Source repository: https://github.com/actions/dependency-review-action +name: 'Dependency Review' +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@03bee3930647ebbf994244c21ddbc0d4933aab4f # v2.3.0 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - name: 'Checkout Repository' + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + - name: 'Dependency Review' + uses: actions/dependency-review-action@0efb1d1d84fc9633afcdaad14c485cbbc90ef46c # v2.5.1 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 9efdb37e..55492ac8 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -4,12 +4,20 @@ on: branches: - main pull_request: +permissions: + contents: read + jobs: php-cs-fixer: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Harden Runner + uses: step-security/harden-runner@03bee3930647ebbf994244c21ddbc0d4933aab4f # v2.3.0 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - name: PHP-CS-Fixer - uses: docker://oskarstark/php-cs-fixer-ga + uses: docker://oskarstark/php-cs-fixer-ga:latest@sha256:73ae29e0cf222d3e132651af5bfb84ac3f210d58cd98e8f863d0b47f8ee0346f with: args: . --diff --dry-run diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index d0260b41..ab8aed99 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -24,6 +24,11 @@ jobs: id-token: write steps: + - name: Harden Runner + uses: step-security/harden-runner@03bee3930647ebbf994244c21ddbc0d4933aab4f # v2.3.0 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + - name: "Checkout code" uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 with: diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index a56a2a48..674043ec 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -4,6 +4,9 @@ on: branches: - main pull_request: +permissions: + contents: read + jobs: build: runs-on: ${{ matrix.operating-system }} @@ -13,14 +16,19 @@ jobs: php-versions: [ '7.4','8.0','8.1','8.2' ] name: PHP ${{ matrix.php-versions }} Unit Test steps: + - name: Harden Runner + uses: step-security/harden-runner@03bee3930647ebbf994244c21ddbc0d4933aab4f # v2.3.0 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - name: Uses PHP ${{ matrix.php-versions }} - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2 with: php-version: ${{ matrix.php-versions }} - name: Install Dependencies - uses: nick-invision/retry@v1 + uses: nick-invision/retry@39da88d5f7d15a96aed861dbabbe8b7443e3182a # v1.0.4 with: timeout_minutes: 10 max_attempts: 3 From d54e85f0c211c77c6de6c13c5f5dc921578b7d65 Mon Sep 17 00:00:00 2001 From: Kenneth Rosario Date: Tue, 11 Apr 2023 15:19:05 -0700 Subject: [PATCH 16/20] chore: make workflows' default permission read only (#139) --- .github/workflows/buildpack-integration-test.yml | 4 ++++ .github/workflows/conformance.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/buildpack-integration-test.yml b/.github/workflows/buildpack-integration-test.yml index 07b4f17c..f61705fe 100644 --- a/.github/workflows/buildpack-integration-test.yml +++ b/.github/workflows/buildpack-integration-test.yml @@ -5,6 +5,10 @@ on: branches: - main workflow_dispatch: + +# Declare default permissions as read only. +permissions: read-all + jobs: php74-buildpack-test: uses: GoogleCloudPlatform/functions-framework-conformance/.github/workflows/buildpack-integration-test.yml@v1.8.0 diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 5ab515d6..dbcbf513 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -5,6 +5,10 @@ on: - main pull_request: workflow_dispatch: + +# Declare default permissions as read only. +permissions: read-all + jobs: build: runs-on: ubuntu-latest From eba4ec09578131bfad90318b23cad364d21ab931 Mon Sep 17 00:00:00 2001 From: Kenneth Rosario Date: Thu, 13 Apr 2023 11:16:54 -0700 Subject: [PATCH 17/20] chore: Create renovate config (#138) --- .github/renovate.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/renovate.json diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000..32ac90d6 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["group:allNonMajor", "schedule:monthly"], + "packageRules": [ + { + "description": "Create a PR whenever there is a new major version", + "matchUpdateTypes": [ + "major" + ] + } + ], + "ignorePaths": [ + "examples/**" + ] +} From 395181ded7bbd17c59112c52308848901a82f80f Mon Sep 17 00:00:00 2001 From: Kenneth Rosario Date: Fri, 14 Apr 2023 10:26:33 -0700 Subject: [PATCH 18/20] chore: Create blunderbuss.yml according to preference (#140) --- .github/blunderbuss.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/blunderbuss.yml diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 00000000..37151ba5 --- /dev/null +++ b/.github/blunderbuss.yml @@ -0,0 +1,7 @@ +assign_prs: + - josephlewis42 + - KaylaNguyen + +assign_issues: + - josephlewis42 + - KaylaNguyen From e55fef1caf138837a2ca004bdd7498d92d311701 Mon Sep 17 00:00:00 2001 From: StepSecurity Bot Date: Thu, 25 May 2023 10:12:52 -0700 Subject: [PATCH 19/20] chore: [StepSecurity] Apply security best practices (#142) --- examples/hello/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/hello/Dockerfile b/examples/hello/Dockerfile index 20b178ca..15671b98 100644 --- a/examples/hello/Dockerfile +++ b/examples/hello/Dockerfile @@ -1,4 +1,4 @@ -FROM gcr.io/gae-runtimes/php74:php74_20210216_7_4_15_RC00 +FROM gcr.io/gae-runtimes/php74:php74_20210216_7_4_15_RC00@sha256:b7d4aef9e57c17152c2ea9a3fbd04c23687fc93c7254608bdf6e19f14a7c10f3 WORKDIR /srv/ From 72da9b3ac108e0605446e2b9e8b11905cf8ad3f5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 14:24:24 -0700 Subject: [PATCH 20/20] chore(main): release 1.2.0 (#133) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29b..38372e86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,25 @@ +# Changelog + +## [1.2.0](https://github.com/GoogleCloudPlatform/functions-framework-php/compare/v1.1.0...v1.2.0) (2023-05-25) + + +### Features + +* add class for testing ([#119](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/119)) ([41ab525](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/41ab52514051df9976285fa788a7e7239dec7715)) + + +### Miscellaneous Chores + +* [StepSecurity] Apply security best practices ([#137](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/137)) ([ed6afaa](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/ed6afaad643862d9a0912ca2539fa4f1de0c4ecc)) +* [StepSecurity] Apply security best practices ([#142](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/142)) ([e55fef1](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/e55fef1caf138837a2ca004bdd7498d92d311701)) +* add GCF buildpack integration test Workflow ([2da1fa3](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/2da1fa3ef34f632aa4179adef830972a5223b572)) +* add GCF buildpack integration test Workflow ([#129](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/129)) ([8db2c42](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/8db2c426cd0c0e4ae32abfe62b2dbf9f73b0b013)) +* configure security scorecard action ([#134](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/134)) ([a482dda](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/a482dda7017043ca41eefa6d4966fff8e8b08cff)) +* Create blunderbuss.yml according to preference ([#140](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/140)) ([395181d](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/395181ded7bbd17c59112c52308848901a82f80f)) +* Create renovate config ([#138](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/138)) ([eba4ec0](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/eba4ec09578131bfad90318b23cad364d21ab931)) +* fix invoker docblock ([#117](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/117)) ([6d4c545](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/6d4c545183d4c2eb9d89d981904b488c377acd4a)) +* make workflows' default permission read only ([#139](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/139)) ([d54e85f](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/d54e85f0c211c77c6de6c13c5f5dc921578b7d65)) +* Rename unit.yaml to unit.yml ([#136](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/136)) ([360b7d6](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/360b7d6605077f2977539e9d8b3455df44847ad3)) +* switch master to main ([#121](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/121)) ([c693c8c](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/c693c8c77166fab1fa88a8d47d3fb60768dc3c11)) +* update buildpack integration test ([#132](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/132)) ([e66d6f2](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/e66d6f20b166f5ae9d216051aacdc7f39815568a)) +* use Release Please for releases ([#126](https://github.com/GoogleCloudPlatform/functions-framework-php/issues/126)) ([d5c3589](https://github.com/GoogleCloudPlatform/functions-framework-php/commit/d5c3589012e2daeba963576eaf3748a7b4622b0f))