From 342b274313c56b2f7e25c936714075c1923a3726 Mon Sep 17 00:00:00 2001 From: Kenneth Ye Date: Wed, 12 Jun 2024 09:11:00 -0700 Subject: [PATCH] Upgrade composer version to 2.2. PiperOrigin-RevId: 642634701 Change-Id: I17363c6858282f8e565e472ddea86ae559533752 --- builders/php/acceptance/gcf_test.go | 2 +- cmd/php/cloudfunctions/main.go | 2 +- cmd/php/cloudfunctions/main_test.go | 2 +- cmd/php/composer_install/main.go | 2 +- cmd/php/functions_framework/main.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builders/php/acceptance/gcf_test.go b/builders/php/acceptance/gcf_test.go index 42af692fb..e8bf44e4f 100644 --- a/builders/php/acceptance/gcf_test.go +++ b/builders/php/acceptance/gcf_test.go @@ -169,7 +169,7 @@ func TestFailures(t *testing.T) { { App: "fail_vendored_framework_no_router_script", VersionInclusionConstraint: "< 8.2.0", - MustMatch: `functions framework router script vendor/bin/router\.php is not present`, + MustMatch: `functions framework router script vendor/google/cloud-functions-framework/router.php is not present`, }, { App: "fail_vendored_no_framework_no_installed_json", diff --git a/cmd/php/cloudfunctions/main.go b/cmd/php/cloudfunctions/main.go index fe46e0009..3708dcbb3 100644 --- a/cmd/php/cloudfunctions/main.go +++ b/cmd/php/cloudfunctions/main.go @@ -24,7 +24,7 @@ import ( const ( // routerScript is the path to the functions framework invoker script. - routerScript = "vendor/bin/router.php" + routerScript = "vendor/google/cloud-functions-framework/router.php" ) func main() { diff --git a/cmd/php/cloudfunctions/main_test.go b/cmd/php/cloudfunctions/main_test.go index 1528f1787..e458cd897 100644 --- a/cmd/php/cloudfunctions/main_test.go +++ b/cmd/php/cloudfunctions/main_test.go @@ -63,7 +63,7 @@ func TestEntrypoint(t *testing.T) { t.Fatalf("unexpected error creating entrypoint: %v", err) } - want := "serve -enable-dynamic-workers -workers=1024 vendor/bin/router.php" + want := "serve -enable-dynamic-workers -workers=1024 vendor/google/cloud-functions-framework/router.php" if ep.Command != want { t.Errorf("entrypoint set wrong, got: %q, want: %q", ep.Command, want) } diff --git a/cmd/php/composer_install/main.go b/cmd/php/composer_install/main.go index bd1f1e9be..10108267c 100644 --- a/cmd/php/composer_install/main.go +++ b/cmd/php/composer_install/main.go @@ -33,7 +33,7 @@ var ( composerLayer = "composer" composerJSON = "composer.json" composerSetup = "composer-setup" - composerVer = "2.1.3" + composerVer = "2.2.24" versionKey = "version" composerSigURL = "https://composer.github.io/installer.sig" composerSetupURL = "https://getcomposer.org/installer" diff --git a/cmd/php/functions_framework/main.go b/cmd/php/functions_framework/main.go index ff224ec2d..ca69c5f29 100644 --- a/cmd/php/functions_framework/main.go +++ b/cmd/php/functions_framework/main.go @@ -44,7 +44,7 @@ const ( ffPackagistURL = "https://packagist.org/packages/google/cloud-functions-framework" // routerScript is the path to the functions framework invoker script. - routerScript = "vendor/bin/router.php" + routerScript = "vendor/google/cloud-functions-framework/router.php" // cacheTag is the cache tag for the `composer install` layer. We only cache in one case: There // is no composer.json file and there is no vendor directory (i.e. a dependency-less function).