Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: adrienrn/php-mimetyper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: wgenial/php-mimetyper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 9 commits
  • 10 files changed
  • 1 contributor

Commits on Feb 16, 2018

  1. update package name

    giovanigenerali committed Feb 16, 2018
    Copy the full SHA
    e00a425 View commit details

Commits on Nov 5, 2018

  1. Copy the full SHA
    7af8618 View commit details
  2. update mime-db

    giovanigenerali committed Nov 5, 2018
    Copy the full SHA
    6260b33 View commit details
  3. update readme

    giovanigenerali committed Nov 5, 2018
    Copy the full SHA
    48f896c View commit details

Commits on Jul 24, 2020

  1. Fix typo on namespace

    giovanigenerali committed Jul 24, 2020
    Copy the full SHA
    a68b6ae View commit details
  2. Copy the full SHA
    84656c7 View commit details
  3. update dependencies

    giovanigenerali committed Jul 24, 2020
    Copy the full SHA
    152da59 View commit details
  4. code style

    giovanigenerali committed Jul 24, 2020
    Copy the full SHA
    dc0c22d View commit details
  5. add shields

    giovanigenerali authored Jul 24, 2020
    Copy the full SHA
    0b177d7 View commit details
11 changes: 4 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
composer.phar
/vendor/

# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
node_modules/
node_modules
!node_modules/mime-db/db.json
vendor
composer.lock
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# php-mimetyper

PHP mime type and extension mapping library: built with [jshttp/mime-db](http://github.com/jshttp/mime-db), compatible with Symfony and Laravel.
PHP mime type and extension mapping library: built with [jshttp/mime-db](http://github.com/jshttp/mime-db).


[![Packagist](https://img.shields.io/packagist/v/wgenial/php-mimetyper.svg?maxAge=900)](https://packagist.org/packages/wgenial/php-mimetyper)
[![GitHub license](https://img.shields.io/github/license/wgenial/php-mimetyper.svg)](https://github.com/wgenial/php-mimetyper/blob/master/LICENSE)

```php
use MimeTyper\Repository\MimeDbRepository;
@@ -17,7 +21,9 @@ $mimeRepository->findType("js"); // 'application/javascript'

> The most complete and up-to-date mime type mapping for PHP!
The goal is to provide a complete and up-to-date mime types mapping for PHP and build a comprehensive and simple interface for PHP. This package is heavily inspired from [dflydev](https://github.com/dflydev/dflydev-apache-mime-types) work and extends it.
The goal is to provide a complete and up-to-date mime types mapping for PHP and build a comprehensive and simple interface for PHP.

This package is heavily inspired from [dflydev/dflydev-apache-mime-types](https://github.com/dflydev/dflydev-apache-mime-types) and [adrienrn/php-mimetyper](https://github.com/adrienrn/php-mimetyper) work and extends it.

## Mime types mapping, the right way.

@@ -30,7 +36,7 @@ This library uses [jshttp/mime-db](http://github.com/jshttp/mime-db) as its defa

## Custom mime types and custom repositories

Some custom types (aliases really) are maintained locally too, in the same JSON format as jshttp/mime-db.
Some custom types (aliases really) are maintained locally too, in the same JSON format as jshttp/mime-db.

```php

@@ -106,10 +112,9 @@ It all ends up inspecting the file using [finfo](http://php.net/manual/en/functi
The Hoa package to deal with mime types. Uses `mime.types` Apache file (local fallback) and relies on static methods.

- [karwana/php-mime](https://github.com/karwana/php-mime)

Uses `mime.types` Apache file and finfo, requires PHP >=5.4.

- [PEAR/MIME_Type](https://github.com/pear/MIME_Type)

Detect the mime type of a file: uses internally finfo_file, mime_content_type or file command to guess the mime type.

32 changes: 16 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "adrienrn/php-mimetyper",
"description": "PHP mime type and extension mapping library: compatible with Symfony, powered by jshttp/mime-db",
"require": {
"dflydev/apache-mime-types": "^1.0"
},
"license": "MIT",
"authors": [
{
"name": "Hussard",
"email": "adrien.ricartnoblet@gmail.com"
}
],
"autoload": {
"psr-4": {
"MimeTyper\\": "src/"
}
"name": "wgenial/php-mimetyper",
"description": "PHP mime type and extension mapping library: compatible with Symfony, powered by jshttp/mime-db",
"require": {
"dflydev/apache-mime-types": "^1.0"
},
"license": "MIT",
"authors": [
{
"name": "Hussard",
"email": "adrien.ricartnoblet@gmail.com"
}
],
"autoload": {
"psr-4": {
"MimeTyper\\": "src/"
}
}
}
Loading