Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] Switch to using a non abandoned library for getting a mapping o… #16436

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

seamuslee001
Copy link
Contributor

…f mimetpyes to extensions

Overview

As picked up by @stesi561 the current library we use for a mapping of mimetypes to file extensions is now abandoned this switches it to the library https://github.com/adrienrn/php-mimetyper

Before

Abandoned Library used

After

Non Abandoned library used

I believe that the unit tests added here 6cb3fe2#diff-bc35985bf1e1cabd25b2ad862413d38eR98 ensure that we have sufficient coverage to prevent a regression in this area

ping @eileenmcnaughton @totten

@civibot
Copy link

civibot bot commented Jan 31, 2020

(Standard links)

@civibot civibot bot added the master label Jan 31, 2020
@seamuslee001
Copy link
Contributor Author

Jenkins re test this please

1 similar comment
@seamuslee001
Copy link
Contributor Author

Jenkins re test this please

@seamuslee001 seamuslee001 force-pushed the phpmimetype_library_upgrade branch from 0b2b2ef to e547e5e Compare January 31, 2020 05:40
@yashodha
Copy link
Contributor

@seamuslee001 the test failures don't look related.

@yashodha
Copy link
Contributor

test this please

@seamuslee001
Copy link
Contributor Author

Jenkins re test this please

@seamuslee001 seamuslee001 force-pushed the phpmimetype_library_upgrade branch from e547e5e to 456ee8f Compare February 16, 2020 22:53
@seamuslee001 seamuslee001 force-pushed the phpmimetype_library_upgrade branch from 456ee8f to 59a36ff Compare March 1, 2020 22:19
@seamuslee001
Copy link
Contributor Author

@eileenmcnaughton @totten @stesi561 I believe this is a fine drop in replacement can you folks confirm?

@stesi561
Copy link
Contributor

stesi561 commented Mar 2, 2020

I only see one reference to "\MimeType\Mapping" in the codebase. What else needs confirming?

@seamuslee001
Copy link
Contributor Author

@stesi561 that you can still view attached files and that the contact image shows correctly on the contact summary screen

@mattwire
Copy link
Contributor

@seamuslee001 Needs rebase

@seamuslee001 seamuslee001 force-pushed the phpmimetype_library_upgrade branch from 59a36ff to 108332d Compare March 11, 2020 19:59
@seamuslee001
Copy link
Contributor Author

rebased now @mattwire

@mlutfy
Copy link
Member

mlutfy commented Mar 16, 2020

Is the new library more actively maintained? or is it because of active/known bugs with the current lib?

@seamuslee001
Copy link
Contributor Author

@mlutfy the katzien library is giving out a notice in composer saying it has been abaondoned hence the change

@seamuslee001
Copy link
Contributor Author

@mlutfy "Package katzien/php-mime-type is abandoned, you should avoid using it. No replacement was suggested."

@mlutfy
Copy link
Member

mlutfy commented Mar 17, 2020

OK :)

Seems good to me, based on code review. Will try to do a quick test-run.

Jenkins, test this please.

@mlutfy mlutfy merged commit cee0817 into civicrm:master Mar 17, 2020
@mlutfy
Copy link
Member

mlutfy commented Mar 17, 2020

I did a bit of poking around on the test site and looks good. Thanks @seamuslee001

@seamuslee001 seamuslee001 deleted the phpmimetype_library_upgrade branch March 17, 2020 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants