Skip to content

fix: restore backward compatibility of with* methods (regression from v1.7.3)#59

Merged
vazarkevych merged 1 commit intogrowthbook:masterfrom
vazarkevych:fix/restore-with-methods-backward-compatibility
Mar 26, 2026
Merged

fix: restore backward compatibility of with* methods (regression from v1.7.3)#59
vazarkevych merged 1 commit intogrowthbook:masterfrom
vazarkevych:fix/restore-with-methods-backward-compatibility

Conversation

@vazarkevych
Copy link
Copy Markdown
Collaborator

Problem

v1.7.3 introduced a breaking change: all with* methods were made immutable (returning a cloned instance instead of modifying $this). This broke existing code without any error or warning, violating semantic versioning.

Solution

Restored mutable behavior of with* methods to match v1.7.2. Added @deprecated annotations on all with* methods pointing to their set* equivalents to prepare users for the upcoming v2.0.0.

…lity

with* methods in v1.7.3 were changed to immutable (clone-based), which
introduced a breaking change in a patch release, violating semver.

This restores with* to mutable behavior (as in v1.7.2) and marks them
as @deprecated in favor of the new set* equivalents. The with* methods
will become properly immutable in v2.0.0.
@vazarkevych vazarkevych merged commit 68c4944 into growthbook:master Mar 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant