thephpleague / flysystem

Abstraction for local and remote filesystems
https://flysystem.thephpleague.com
MIT License
13.37k stars 831 forks source link

Externalize (make not internal) MimeType class maybe? #868

Closed OJezu closed 5 years ago

OJezu commented 7 years ago

Because of problems with detecting mime type by contents (stupid jQuery having both doctype and html tag in sources), I've decided to detect mime type by file extension only, which seems a good enough approach for my needs. I've also found out that MimeType class has a nice API to do it, as Flysystem adapters fall back to extension-based detection in some cases.

But MimeType class is internal, which makes my IDE sad, and myself scared of API changes. Could it perhaps stop being internal, on merit of being quite useful? As I understand it is to be used in Adapters (as seen in #770), so I guess some BC guarantee should apply anyway.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

shahruslan commented 3 years ago

I have the same question. I need to specify a different MimeTypeDetector. How to do it if the class is marked as @internal ?