Eppo PHP SDK: the default FileSystem cache breaks on read-only filesystems
Guide Eppo PHP SDK: the default FileSystem cache breaks on read-only filesystems: always pass an explicit PSR-16 cache when initializing the PHP client, one backed by Redis or Memcached in production, never rely on the FileSystem default outside local dev. Use this when you hit exactly this in Eppo PHP SDK. Not for different errors or different tools.
TL;DR: always pass an explicit PSR-16 cache when initializing the PHP client, one backed by Redis or Memcached in production, never rely on the FileSystem default outside local dev. Set the SDK key as the first init argument and leave the base URL unset unless you run a custom endpoint. If you deploy to a read-only filesystem and see cache write failures on boot, the missing cache argument is the cause.
Fix
always pass an explicit PSR-16 cache when initializing the PHP client, one backed by Redis or Memcached in production, never rely on the FileSystem default outside local dev. Expected: this specific failure stops.
Set the SDK key as the first init argument and leave the base URL unset unless you run a custom endpoint. Expected: this specific failure stops.
This applies to the other optional init pieces too: pass your own PSR-18 HTTP client and PSR-17 request factory in production rather than letting discovery pick whatever is installed. Expected: this specific failure stops.
Details
If you deploy to a read-only filesystem and see cache write failures on boot, the missing cache argument is the cause.
When to use
You hit exactly this: Eppo PHP SDK: the default FileSystem cache breaks on read-only filesystems in Eppo PHP SDK.
When not to use
A different error, or the same symptom in a different tool. This page only covers the failure above.
Compatibility
Eppo PHP SDK.