NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #342 most downloaded on Packagist
Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
Last release 4 months ago
24 May 2026
Release timing varies
gaps range from 9 days to 13 months
Rarely documented
notes for 14 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
93 releases · first in 2012
perf(bench): overhaul phpbench suite + advisory CI + release hygiene by @serbanghita in #1015
Full Changelog: 4.10.0...4.11.0
Detection\Cache\Cache is now bounded (default 1000 entries, FIFO eviction). Prevents unbounded in-memory growth when one MobileDetect instance is reused across many distinct User-Agents in a long-running PHP runtime (RoadRunner, Laravel Octane, FrankenPHP worker mode, Swoole, ReactPHP, queue workers). Not applicable to classic PHP-FPM / mod_php deployments — the cache dies with the request. Custom PSR-16 adapters (Redis, APCu, Memcached, Filesystem) are out of scope; their eviction policy is the operator's responsibility.Detection\Cache\Cache::__construct(int $maxEntries = Cache::DEFAULT_MAX_ENTRIES) — tune the in-memory cap via new MobileDetect(new Cache($n)).Cache::DEFAULT_MAX_ENTRIES constant (1000) and Cache::getMaxEntries() accessor.README-EXAMPLES.md "Long-Running Processes" — worker example now uses clear() (was evictExpired(), which is a no-op against fresh entries under the default 86 400 s TTL); added explicit note framing in-memory cache bounding as a systems-level concern with the bundled cap, and pointing operators at their own adapter's eviction for custom PSR-16 backends.Cache::evictExpired() docblock — clarified that it bounds by expiration, not by cardinality. Method behavior is unchanged.One column per quarter.
fix(cache): restore PSR-16 v1/v2 LSP compatibility ( #989 ) by @serbanghita in #1014
Full Changelog: 4.9.0...4.10.0
Detection\Cache\Cache method signatures widened to be Liskov-compatible with psr/simple-cache v1, v2, and v3 simultaneously. Resolves #989 — the class no longer fatals at load time on hosts where another package has already registered an older CacheInterface (common in WordPress stacks).composer.json: psr/simple-cache constraint widened to ^1.0 || ^2.0 || ^3.0.composer.json (was >=8.0). PHP 8.0 and 8.1 are both end-of-life and had already been dropped from CI in 4.9.0 because phpbench/phpbench: 1.6.1 requires PHP ^8.2.psr16-compat CI matrix that verifies Cache remains LSP-compatible with every supported major of psr/simple-cache (1.x, 2.x, 3.x).Detection\Cache\Cache that overrode get/set/has/delete/getMultiple/setMultiple/deleteMultiple (or protected checkKey) with narrowed parameter types (e.g. function get(string $key, …)) will fatal at class load on this version. Drop the scalar type from the override, or widen to mixed, to restore LSP compatibility.Lenovo: broad Lenovo TB prefix match for modern tablets ( #1013 ).
Minor release.
Lenovo TB prefix match for modern tablets (#1013).MobileDetect::VERSION_TYPE_STRING and VERSION_TYPE_FLOAT constants promoted to public (#991).Cache::getTimestamp() method name typo (was getTimeStamp) (#1007).Full changelog: 4.8.10...4.9.0
Lenovo TB prefix match for modern tablets (#1013).MobileDetect::VERSION_TYPE_STRING and VERSION_TYPE_FLOAT constants promoted to public (#991).Cache::getTimestamp() method name typo (was getTimeStamp) (#1007).fix(cache): PSR-16 compliance for has() method and add evictExpired()…
fix(cache): PSR-16 compliance for has() method and add evictExpired()…
Cache::has() now properly checks TTL expiration before returning true (PSR-16 compliance fix). Previously, has() returned true for expired items.Cache::evictExpired() method to manually clean up expired cache entries. Useful for long-running processes (CLI scripts, workers, daemons) to prevent memory growth.Cache class: added 17 new tests covering all if/else branches including custom defaults, DateInterval TTL, key validation edge cases, and expiration scenarios.README-EXAMPLES.md with comprehensive usage examples including long-running processes, framework integration, and debugging.Cache::has() now deletes expired items on check (lazy cleanup, consistent with get() behavior).Release 3.74.4 - Sync regex patterns and test data from 4.8.x
Release 3.74.4 - Sync regex patterns and test data from 4.8.x
Nothing published for this version
Nothing published for this version
Nothing published for this version
Release 2.8.47 - Sync regex patterns and test data from 4.8.x
Release 2.8.47 - Sync regex patterns and test data from 4.8.x
Release 2.8.46 - Fix PHP 8.4 implicit nullable parameter deprecation
Release 2.8.46 - Fix PHP 8.4 implicit nullable parameter deprecation
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
- 2.8.41 - fc9cccd - Verified
2.8.41
fc9cccd
Verified
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →