Require the betas of the Meta Conversions API bundle and SDK - #90
Merged
Merged
Conversation
v2.0.0-beta.2 of the SDK replaced the payload context constants with an enum, and v1.0.0-alpha.1 of the bundle, which still uses the constants, allows that release. The plugin allowed both, so updating only the SDK left a shop with a pair that fails with an undefined constant error on every page that raises an event. The constraints are now ^1.0.0-beta.1 and ^2.0.0-beta.2, the first releases that work together. A lower bound is used rather than a stability flag, because a flag on a dependency's requirement is ignored when the plugin is installed into a shop. The docs ask for @beta instead of @Alpha, and the upgrade guide tells those who installed v3.0.0-beta.2 to update the packages together.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.x #90 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 113 113
===========================================
Files 25 25
Lines 410 410
===========================================
Hits 410 410 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the plugin to the betas of the Meta Conversions API bundle (
v1.0.0-beta.1) and SDK (v2.0.0-beta.3).Why the constraints change, not just the lock
v2.0.0-beta.2of the SDK replacedParameters::PAYLOAD_CONTEXT_*with thePayloadContextenum.v1.0.0-alpha.1of the bundle still uses the constants, and its own constraint allows the SDK betas.v3.0.0-beta.2of the plugin allows all of them (^1.0@alpha,^2.0@alpha), so:beta.1with SDKbeta.3, butcomposer update setono/meta-conversions-api-php-sdkon its own leaves bundlealpha.1with SDKbeta.3. Reproduced here:ServerSideTrackingTestfails withUndefined constant Setono\MetaConversionsApi\Event\Parameters::PAYLOAD_CONTEXT_BROWSER.The constraints are now
^1.0.0-beta.1and^2.0.0-beta.2, the first releases that work together. It is a lower bound rather than an@betaflag on purpose: a stability flag on a dependency's requirement is ignored when the plugin is installed into a shop, a lower bound is not. Checked withcomposer/semver: bundlealpha.1and SDKalpha.3/beta.1no longer satisfy them.The plugin's own code
Unchanged. Nothing in
src/uses what the SDK betas changed: theEventsubclasses only override the constructor, notgetMapping(), and nothing touches the payload context,User::$fbc/$fbporFbp::$randomNumber.Docs
The install commands in the README and UPGRADE.md ask for
@betainstead of@alpha, and UPGRADE.md tells those who installedv3.0.0-beta.2to change the flags and update the plugin, the bundle and the SDK together.Verified locally (PHP 8.3)
beta.1, SDKbeta.3):composer validate --strict,composer normalize --dry-run, ECS, PHPStan, Rector,lint:container, 76 unit and 15 functional tests.beta.1, SDKbeta.2): PHPStan and both test suites.PageViewandViewContent, which is the client side path thatalpha.1broke.src/and the tests are unchanged.