PHPackages                             autoframe/components-filemime - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. autoframe/components-filemime

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

autoframe/components-filemime
=============================

Core File Mime Utils Autoframe Framework

3.0.0(2y ago)08341MITPHPPHP ^7.4 || ^8.0

Since May 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/autoframe/components-filemime)[ Packagist](https://packagist.org/packages/autoframe/components-filemime)[ Docs](https://github.com/autoframe)[ RSS](/packages/autoframe-components-filemime/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (1)

Autoframe is a low level framework that is oriented on SOLID flexibility
========================================================================

[](#autoframe-is-a-low-level-framework-that-is-oriented-on-solid-flexibility)

[![Build Status](https://github.com/autoframe/components-filemime/workflows/PHPUnit-tests/badge.svg?branch=main)](https://github.com/autoframe/components-filemime/actions?query=branch:main)[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)[![Packagist Version](https://camo.githubusercontent.com/85771bdb69c1570a545ee02aadb4ae7e0baded17ff06fc61819f1cedaa234251/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6175746f6672616d652f636f6d706f6e656e74732d66696c656d696d653f6c6162656c3d7061636b6167697374253230737461626c65)](https://camo.githubusercontent.com/85771bdb69c1570a545ee02aadb4ae7e0baded17ff06fc61819f1cedaa234251/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6175746f6672616d652f636f6d706f6e656e74732d66696c656d696d653f6c6162656c3d7061636b6167697374253230737461626c65)[![Downloads](https://camo.githubusercontent.com/9eca9e1de5e0ee99752830f1c39a9dd92393caceb6600dc82a8e31397f00118c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6175746f6672616d652f636f6d706f6e656e74732d66696c656d696d652e737667)](https://packagist.org/packages/autoframe/components-filemime)

*PHP server side file mime SOLID*

Namespace:

- Autoframe\\Component\\FileMime

Class is a SINGLETON:

- AfrFileMimeClass + AfrFileMimeInterface + AfrFileMimeTrait
- Methods:
    - getFileMimeTypes: array *\[... 'image/jpeg' =&gt; \['jpeg','jpg','jpe'\], ...\]*
    - getFileMimeExtensions: array *\[... 'jpeg' =&gt; 'image/jpeg', ...\]*
    - getFileMimeFallback: string *'application/octet-stream'*
    - getAllMimesFromFileName: array *Input: '/dir/test.wmz' Output: \['application/x-ms-wmz','application/x-msmetafile'\] (wmz extension has multiple mimes)*
    - getMimeFromFileName: string *Input: '/dir/test.jpg' Output: 'image/jpeg'*
    - getExtensionsForMime: array *Input: 'image/jpeg' Output: \['jpeg','jpg','jpe'\]*
    - getExtensionFromPath: string *Input: '/dir/test.jpg' Output: 'jpg'*

Traits:

- AfrFileMimeTypes *public static array $aAfrFileMimeTypes = \[...\]*
- AfrFileMimeExtensions *public static array $aAfrFileMimeExtensions = \[...\]*

Utility class reads/updates the file 'mime.types' and writes new traits AfrFileMimeExtensions and AfrFileMimeTypes

- AfrFileMimeGeneratorClass
- Runs only in local tests (not from inside vendor dir)
- mime.types is updated from

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Total

4

Last Release

1072d ago

Major Versions

1.0.2 → 2.0.02023-06-04

2.0.0 → 3.0.02023-06-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/d6ba2f50102c2d35a8f6773c95fa270199a3af9c555dfc96ac85afb8c10a2a3c?d=identicon)[autoframe](/maintainers/autoframe)

---

Top Contributors

[![autoframe](https://avatars.githubusercontent.com/u/34517931?v=4)](https://github.com/autoframe "autoframe (12 commits)")

---

Tags

mimefile

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/autoframe-components-filemime/health.svg)

```
[![Health](https://phpackages.com/badges/autoframe-components-filemime/health.svg)](https://phpackages.com/packages/autoframe-components-filemime)
```

###  Alternatives

[symfony/mime

Allows manipulating MIME messages

2.8k668.8M911](/packages/symfony-mime)[zbateson/mail-mime-parser

MIME email message parser

53949.2M79](/packages/zbateson-mail-mime-parser)[php-mime-mail-parser/php-mime-mail-parser

A fully tested email parser for PHP 8.0+ (mailparse extension wrapper).

9979.6M27](/packages/php-mime-mail-parser-php-mime-mail-parser)[nette/mail

📧 Nette Mail: A handy library for creating and sending emails in PHP.

5389.8M246](/packages/nette-mail)[zbateson/stream-decorators

PHP psr7 stream decorators for mime message part streams

4748.6M6](/packages/zbateson-stream-decorators)[dflydev/apache-mime-types

Apache MIME Types

701.9M35](/packages/dflydev-apache-mime-types)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
