From aba906f1ab8eff4658e5df46b4bb5b85c8b494fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20L=C3=B8vgaard?= Date: Mon, 31 Aug 2026 13:54:33 +0200 Subject: [PATCH] Allow facebook/php-business-sdk ^26.0 (Graph API v26.0) Widen the constraint to "^25.0 || ^26.0" so consumers can pick up Graph API v26.0. The package is only used for ApiConfig::APIVersion, Normalizer::normalize and Util::hash, all of which are unchanged in 26.x. ClientTest::it_sends_event asserted a hardcoded v25.0 endpoint; it now derives the version from ApiConfig::APIVersion so it passes with either major. Closes #10 --- composer.json | 2 +- tests/Client/ClientTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 014c86a..e10bcf7 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "require": { "php": ">=8.1", "ext-json": "*", - "facebook/php-business-sdk": "^25.0", + "facebook/php-business-sdk": "^25.0 || ^26.0", "php-http/discovery": "^1.20", "psr/http-client": "^1.0", "psr/http-client-implementation": "*", diff --git a/tests/Client/ClientTest.php b/tests/Client/ClientTest.php index 40699e9..d69d353 100644 --- a/tests/Client/ClientTest.php +++ b/tests/Client/ClientTest.php @@ -47,7 +47,7 @@ public function it_sends_event(): void $request = $httpClient->requests[0]; self::assertSame('POST', $request->getMethod()); - self::assertSame('https://graph.facebook.com/v25.0/pixel_id/events', (string) $request->getUri()); + self::assertSame(sprintf('https://graph.facebook.com/v%s/pixel_id/events', ApiConfig::APIVersion), (string) $request->getUri()); self::assertSame('data=%5B%7B%22event_name%22%3A%22Purchase%22%2C%22event_time%22%3A1658743659123%2C%22event_id%22%3A%22event_id%22%2C%22action_source%22%3A%22website%22%7D%5D', (string) $request->getBody()); }