Upgrading psr/simple-cache 0.1 to 0.2
Breaking0.1.0 → 0.2.0Breaking2New1
BreakingUpgrade verdict
2 breaking changes.
In plain terms
- The method that checks whether a key exists is now called has(), so old calls to exists() must be updated.
- Three shortcut constants for time-to-live values are gone, so code using them will fail.
Must act 2 items need code or config changes
What you must change
Breaking2
Renames exists() to has() for consistency with PSR-6.
exists()has()Removes the TTL_DAY, TTL_HOUR and TTL_MINUTE constants.
TTL_DAYTTL_HOURTTL_MINUTEAPI changes
Generated by DepDelta from published PHP source. Not mixed with prose notes.
- removed:
const CacheInterface.TTL_DAY - removed:
const CacheInterface.TTL_HOUR - removed:
const CacheInterface.TTL_MINUTE - removed:
method CacheInterface.exists($key) - changed:
method CacheInterface.get($key) → method CacheInterface.get($key, $default = …) - added:
method CacheInterface.has($key)