Releases: rasuvaeff/yii3-ab-testing
Releases · rasuvaeff/yii3-ab-testing
Release list
v2.0.0
Added
- Versioned analytics event contract:
ExposureEvent,ConversionEvent,
DecisionReason,AssignmentSourceandAssignmentReceipt. EventSerializerwithCanonicalEventSerializer— one wire format shared by
every delivery path, with the row shapes published as importable Psalm types.EventIdGeneratorwith three implementations:Uuid7EventIdGenerator
(default, no dependencies),SymfonyUidEventIdGeneratorand
RamseyUuidEventIdGenerator.AttributionWindowandRepeatedConversionPolicy— the reporting rules that
decide what conversion numbers mean.SystemClock, andclock/eventIds/contextPolicyarguments on
AbTesting.AbTesting::trackConversionForReceipt()for a conversion in a later request.fixtures/golden-event-v2.json, shipped so adapters can assert the same rows.ConfigurationAwareAssignmentStore, moved here fromyii3-ab-testing-webso
the cookie store and the database store can share it without depending on
each other.
Changed
- Breaking.
ExposureTrackerandConversionTrackertake an event instead
of anAssignmentand a goal. - Breaking.
AssignmentreplacesisForced,isFallback,isStickyand
isTargetingMismatchproperties with areason/sourcepair and
same-named methods. - Breaking.
AnalyticsContextPolicy(was
AnalyticsContextPolicyInterfaceinyii3-ab-testing-outbox) moved into the
core, so every delivery path applies one allow-list. - Breaking. Logger sinks emit the canonical row under an
eventkey,
making them the log-shipping delivery path. - Breaking. An empty conversion goal now reports
Event field "goal" must not be empty. trackExposure()andtrackConversion()return the recorded event.
See UPGRADE.md for the migration steps.
v1.6.0
- Decode targeting trees in
ConfigExperimentProviderwith the extensible,
bidirectionalTargetingRuleCodec/TargetingRuleCodecRegistryshared by
config and storage backends. - Add the
AssignmentResolvercontract, implement it inAbTesting, and add
context-aware boolean checks throughisWithContext(). - Add optional string
configurationIdtoExperimentandAssignment; config
experiments receive a deterministic canonical definition hash. - Add request-scoped
DeduplicatingExposureTracker, keyed by experiment,
subject and configuration identity, with an explicit workerreset()hook.
v1.5.2
v1.5.1
v1.5.0
- Ship an AI agent skill (
resources/skills/rasuvaeff-yii3-ab-testing/SKILL.md+
extra.skillsin composer.json): projects using thellm/skillsComposer
plugin get the skill synced into.agents/skills/automatically on install. - Bump
rasuvaeff/property-testingdev dependency to^2.6. - Make property-based generator methods
public static(rector's
RemoveUnusedPrivateMethodRectorwould delete private ones — they are only
called via reflection).
v1.4.2
- Add
/benchmarksand/Makefileto.gitattributesexport-ignore.
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
v1.4.1
v1.4.0
TargetingRuleinterface + 4 implementations:EnvironmentTargetingRule,
AttributeTargetingRule,AndTargetingRule,OrTargetingRule.Experimentnow accepts optional?TargetingRule $targeting = null; subjects
that don't match receive the fallback variant.AssignmentgainsisTargetingMismatch: bool(default false) to distinguish
targeting-excluded subjects from disabled-experiment fallback.AbTesting::assign()checks targeting after the disabled-experiment guard and
before calling the assignment strategy.forcedVariantbypasses targeting.
v1.3.0
LoggerExposureTracker/LoggerConversionTracker— default zero-infra sinks that write each event as one structured PSR-3 log record (log level configurable). Folded in from the formeryii3-ab-testing-psr-loggeradapter. Coreconfig/di.phpdoes not bind them (one-source rule); bind them in app config. Addspsr/logas a runtime dependency.
v1.2.0
FlushableTrackerinterface for buffered sinks;CompositeExposureTrackerandCompositeConversionTrackerimplement it and propagateflush()to flushable inner trackers.Assignment::isStickyflag — set by sticky resolvers (adapters) when an assignment is served from anAssignmentStore.ExperimentRegistryis now lazy: the provider is queried on first access and memoized; newreset()re-reads it. Coreconfig/di.phpregisters aresethook foryiisoft/diStateResetter, so in worker runtimes (RoadRunner, Swoole) a kill switch flipped in the experiment source takes effect on the next request instead of after a worker restart.WeightedHashAssignmentStrategythrowsInvalidArgumentExceptionwhen called directly with a total variant weight of 0 (previouslyDivisionByZeroError); theAssignmentStrategycontract now documents the requirement.- Documented the 64-bit PHP requirement of the hash bucketing.