Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

Should "platform" be specifed for compatibility? #49

Open
sdmeyers opened this issue Oct 25, 2017 · 2 comments
Open

Should "platform" be specifed for compatibility? #49

sdmeyers opened this issue Oct 25, 2017 · 2 comments

Comments

@sdmeyers
Copy link

As is, when run, the composer.json file in lightning 2.2 will install packages that require PHP7.2 or greater (doctorine/annotations seems to cause the most warnings out of the box). This is bad. Acquia Cloud, for example, defaults to 5.6 and only has up to 7.1 available (DevDesktop tops out at 7.0.14).
Tweaking the config part of composer.json to

    "config": {
        "bin-dir": "bin/",
        "platform": {
          "php": "5.6.0"
        }
    },

prevents unnecessary breakage while installing adequately sufficiently update packages to seemingly function just fine.

@balsama
Copy link
Contributor

balsama commented Oct 31, 2017

Interesting. I wasn't aware of the config => platform option. That's cool - and I can see it being useful for people that might have a different PHP version locally or in a VM.

But someone might have a perfectly good reason to want to run (for example) doctrine/inflector:1.2.0 and I think this would prevent them from doing so. So I'm hesitant to commit something like that.

@sdmeyers
Copy link
Author

Agree there is a trade off; however, I'd suggest it would be best to error on the side of not breaking things on common production servers. At the very least these things should be well documented to help avoid such things.

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

No branches or pull requests

2 participants