freema/ga4-analytics-data-bundle
Symfony bundle for pulling Google Analytics 4 Data API reports into your PHP application. It wraps GA4 credentials and reporting queries in configurable services, making it easier to fetch metrics and dimensions without boilerplate.
Recommendation: upgrade to 1.1.2 with high priority — this is a correctness and data-isolation release, not routine housekeeping.
Architecture fit
freema/analytics-data-bundle) is a Symfony bundle, not a Laravel package. Its integration surface is Symfony Flex/DI, Symfony cache pools (cache.app), and Symfony's HTTP client/Guzzle stack. That is a material architectural mismatch against a Laravel target and should be the first thing validated before we invest further.Integration feasibility
Technical risk (pre-1.1.2, i.e. what we avoid by upgrading)
cache.prefix was also ignored, so environments could collide.isTransactionInAnalytics() check was cached as false for the full TTL, producing sustained false negatives in transaction/revenue reconciliation logic.AnalyticsCache::clear() flushed the entire cache.app pool — i.e. one client's cache refresh evicted unrelated application cache. Scoping it to one client is safer but is a semantic change for anyone relying on it as a big red button.Residual risk after upgrade
clear() no longer clears everything. Any runbook, admin endpoint, or deploy step that used it as a general flush must be re-pointed.setAccessible() and the choose_handler() fallback were removed, which is good hygiene, but 8.5 is a fresh target. We should not treat 8.5 as certified until we've run it ourselves.Key questions
AnalyticsCache::clear() today, and does any of them assume a full-pool flush?Stack fit
cache.prefix per environment and per tenant, and confirm each client is configured with its own GA4 property.cache.app assumptions do not exist in Laravel. Options are (a) a thin Laravel service provider that registers the underlying client and maps to Laravel's cache/HTTP contracts, or (b) a Laravel-native GA4 client. Note that the README's Flex recipe reference was removed in this release precisely because the recipe was never published — so there is no scaffolding shortcut. Pick (a) or (b) explicitly, with an owner.Migration path
^1.1.2 in a branch; no source changes expected.cache.prefix per environment.AnalyticsCache::clear() and adjust any that assumed a full-pool flush.Compatibility
choose_handler() fallback means very old Guzzle versions are effectively unsupported. Pin a current Guzzle.Sequencing
prefix, per-client property) → clear() call-site audit → integration test for property isolation → deploy with cold-cache observation.Maintenance
clear() is client-scoped. Undocumented, that becomes a future incident ("cache clear didn't work").Support
Scaling
Failure modes
clear() → a stale entry for another client survives an operator's flush, which is by design but must be understood.Ramp-up
How can I help you explore Laravel packages today?