Skip to content

Move to Meta Graph API ≥ v21.0: upgrade to meta-conversions-api-bundle 1.0 / SDK 1.0 #88

Description

@loevgaard

Why

Meta is retiring Graph API v20.0 on 24 September 2026 ("migrate all calls to v21.0 or higher"). This plugin does not pin a version itself — the chain is setono/meta-conversions-api-php-sdk ~0.2.4facebook/php-business-sdk ^14.0Client::getEndpointVersion()https://graph.facebook.com/v14.0/{pixel}/events. Meta serves that URL as the oldest version the app may use (v20.0 today, v21.0 after the sunset), so tracking keeps working — but we should be explicit and current. SDK 1.0 posts to v25.0.

Blocked on

Changes (once the bundle is released; lands in 3.0.0)

  • composer.json:22-23: setono/meta-conversions-api-bundle^1.0 (or ~0.1.6 if the minimal bundle release ships), setono/meta-conversions-api-php-sdk^1.0. Add "php-http/discovery": false to config.allow-plugins (mirrors the bundle; CI runs non-interactively).
  • src/DependencyInjection/Compiler/OverrideDefaultPixelProviderPass.php:23: alias Setono\MetaConversionsApiBundle\Provider\PixelProviderInterface::class (the FQCN id in bundle 1.0) instead of setono_meta_conversions_api.pixel_provider.default. Without this the alias dangles, PixelProviderInterface stays pointed at the empty ConfigurationBasedPixelProvider, and StopPropagationIfNoPixelsHasBeenAddedSubscriber silently drops every event — admin-configured pixels stop tracking.
  • tests/Unit/DependencyInjection/Compiler/OverrideDefaultPixelProviderPassTest.php:28,31,44: assert the new alias id.
  • README step 5: SDK 1.0 auto-discovers any PSR-18 client / PSR-17 factories, e.g. composer require symfony/http-client nyholm/psr7 or kriswallsmith/buzz nyholm/psr7; remove Client::setResponseFactory() (removed in SDK 1.0).
  • README step 2 consent note: mention the new setono_meta_conversions_api.consent.category option.
  • If only bundle v0.1.6 ships (service ids unchanged), only the composer.json + README items apply.

Verification

  • composer update resolves facebook/php-business-sdk 25.x; vendor/bin/phpunit, vendor/bin/phpstan analyse, vendor/bin/ecs check, vendor/bin/behat green.
  • tests/Application/bin/console debug:container 'Setono\MetaConversionsApiBundle\Provider\PixelProviderInterface' resolves to setono_sylius_facebook.provider.doctrine_based_pixel_provider.
  • Trigger a purchase with ?_testEventCode=TESTxxxx and confirm it appears in Events Manager → Test events; Meta's API Upgrade Tool should then show calls on v25.0.

For shops running the plugin

After the plugin release: composer update setono/sylius-facebook-plugin setono/meta-conversions-api-bundle setono/meta-conversions-api-php-sdk facebook/php-business-sdk --with-all-dependencies, add the allow-plugins entry, make sure a PSR-18 client is installed, deploy, verify a test event.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency fileenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions