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

Problem with composer installing symfony/polyfill #19

Closed
M1ke opened this issue Jun 13, 2018 · 4 comments
Closed

Problem with composer installing symfony/polyfill #19

M1ke opened this issue Jun 13, 2018 · 4 comments
Assignees

Comments

@M1ke
Copy link

M1ke commented Jun 13, 2018

For projects which already use a library dependent on some component of the symfony/polyfill library the composer require process for this library will likely fail, e.g.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - don't install symfony/polyfill v1.7.0|remove symfony/polyfill-php56 v1.4.0
    - don't install symfony/polyfill-php56 v1.4.0|don't install symfony/polyfill v1.7.0
    - don't install symfony/polyfill v1.7.0|don't install symfony/polyfill-php56 v1.4.0
    - datadog/dd-trace 0.1.0 requires symfony/polyfill ~1.7.0 -> satisfiable by symfony/polyfill[v1.7.0].
    - Installation request for datadog/dd-trace ^0.1.0 -> satisfiable by datadog/dd-trace[0.1.0].
    - Installation request for symfony/polyfill-php56 (locked at v1.4.0) -> satisfiable by symfony/polyfill-php56[v1.4.0].

This is likely why the symfony/polyfill project recommend:

It is strongly recommended to upgrade your PHP version and/or install the missing extensions whenever possible. This polyfill should be used only when there is no better choice or when portability is a requirement.

I've installed the library on a system with PHP 7.0.30 and the tests pass fine. So I think it's only a few specific polyfills that might be required and it would be worth listing them.

I can submit a PR to remove the polyfill library but obviously my case isn't the only one. Is there a list of extensions required that we can polyfill specifically for?

@chuck chuck self-assigned this Jul 11, 2018
chuck added a commit that referenced this issue Jul 11, 2018
https://github.com/symfony/polyfill notes that "When using Composer to manage
your dependencies, you should not require the symfony/polyfill package, but the
standalone ones"; also see #19
@jcchavezs
Copy link
Contributor

AFAIR we only required so we could include Throwable in the hinting:

public function setError($error)

@chuck
Copy link
Contributor

chuck commented Jul 11, 2018

Looks like just specifying symfony/polyfill-php70 instead of symfony/polyfill should also work, and is what the library wants us to do.

@chuck chuck closed this as completed Jul 11, 2018
@chuck
Copy link
Contributor

chuck commented Jul 11, 2018

Should be set, please let me know if you have any additional problems here!

@chuck
Copy link
Contributor

chuck commented Aug 1, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants