Skip to content

Upgrading psr/simple-cache 2 to 3

Breaking2.0.0 → 3.0.0Breaking1

BreakingUpgrade verdict

1 breaking change.

  • The cache interfaces now declare what type each method returns. Code that implements these interfaces must add the same return types, or it will stop working.
1 item needs code or config changes
Breaking1
Adds return types to the PSR-16 interfaces, which breaks implementations and callers that do not declare matching return types.

Generated by DepDelta from published PHP source. Not mixed with prose notes.

  • changed: method CacheInterface.clear() → method CacheInterface.clear(): bool
  • changed: method CacheInterface.delete(string $key) → method CacheInterface.delete(string $key): bool
  • changed: method CacheInterface.deleteMultiple(iterable $keys) → method CacheInterface.deleteMultiple(iterable $keys): bool
  • changed: method CacheInterface.get(string $key, mixed $default = …) → method CacheInterface.get(string $key, mixed $default = …): mixed
  • changed: method CacheInterface.getMultiple(iterable $keys, mixed $default = …) → method CacheInterface.getMultiple(iterable $keys, mixed $default = …): iterable
  • changed: method CacheInterface.has(string $key) → method CacheInterface.has(string $key): bool
  • changed: method CacheInterface.set(string $key, mixed $value, null|int|\DateInterval $ttl = …) → method CacheInterface.set(string $key, mixed $value, null|int|\DateInterval $ttl = …): bool
  • changed: method CacheInterface.setMultiple(iterable $values, null|int|\DateInterval $ttl = …) → method CacheInterface.setMultiple(iterable $values, null|int|\DateInterval $ttl = …): bool