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

Add proper provides rules for mbstring and iconv polyfills #54

Closed
wants to merge 1 commit into from

Conversation

@stof
Copy link
Member

stof commented May 10, 2016

Once composer/composer#5030 is resolved, this will allow to install symfony/polyfill-mbstring in a project and having it fulfill a ext-mbstring requirement set by another library not aware of the polyfill.
Without the bug fix, things work already when installing the polyfill from a VCS repo rather than from Packagist or when the polyfill was already installed locally (the bug is on Packagist side when loading metadata).
This would avoid having to do things like beberlei/assert#149 which forces any project using the library to install the polyfill even if they expect to always run with ext-mbstring available (the library could just continue to require ext-mbstring and projects may then choose to require the polyfill to fulfill the dependency)

@stof stof force-pushed the stof:extension_provides branch from a8ae6ce to 0fcfaa7 May 10, 2016
@stof

This comment has been minimized.

Copy link
Member Author

stof commented May 10, 2016

note that I used 7 as version for the provided extension, because polyfill are compatible with the PHP 7 version of extensions. A better provide rule would be to give the version number of the extension itself, but core PHP extensions don't have a proper version number (which is why composer recommends to require * for them as the actual version being detected for them is not useful and may even depend on the way the extension was compiled AFAIK) and so I simply needed to specify a version number here.

@stof

This comment has been minimized.

Copy link
Member Author

stof commented May 10, 2016

@nicolas-grekas the test failure here does not look related to my change

@gerryvdm

This comment has been minimized.

Copy link

gerryvdm commented Feb 22, 2017

I believe a package promising to provide some functionality, should really provide all expected functionality. The mbstring polyfill for example does not provide an expected level of compatibility in my opinion, given only UTF-8 is supported.

@keradus

This comment has been minimized.

Copy link
Member

keradus commented Feb 22, 2017

@gerryvdm , native mbstring could provide different encodings, you should always check it via mb_list_encodings. for that, the polyfill provide only one of them (utf-8), which is fine.

@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Jan 31, 2018

I'm closing here as nothing changed on Composer's side in more than one year. Let's reopen when it'll be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.