ralouphie/mimey
Mimey is a lightweight PHP library that maps file extensions to MIME types and back. It ships with a comprehensive built-in mapping, requires no extensions, and offers simple methods like getMimeTypeFromExtension and getExtensionFromMimeType for reliable content-type detection in Laravel or any PHP...
finfo, fileinfo, or platform upload validation.Mimey\MimeTypes, optionally bind as a singleton in the service container, and wrap behind an internal MimeTypeResolver interface to avoid vendor lock-in. No database, queue, or infrastructure dependency..xml, .ts, .csv variants), case handling, and over-reliance for security-sensitive upload validation. Repository metadata is “unknown,” so maintainer activity, PHP version constraints, and release cadence require due diligence. MIT license is favorable.null for unknown extensions/MIME types? How does it handle case sensitivity and compound extensions? Will it be used only for metadata/UX or for security decisions? What is the fallback when mapping fails?mime_content_type/framework helpers. Introduce the adapter in shadow mode, compare outputs against current behavior for representative files, then replace only non-security-critical paths first. Keep finfo/server-side sniffing as the authoritative check for uploads.finfo or an owned mapping table.null/fallback and never trust client-supplied extensions alone.How can I help you explore Laravel packages today?