Giter VIP home page Giter VIP logo

Comments (4)

enumag avatar enumag commented on September 27, 2024 4

@elton182 Not sure if it is your use-case but there is another thing you might be interested in.

In composer.json you can use the platform option to specify which PHP version should composer use when resolving dependencies. This is useful in cases like having PHP 7.1 locally but PHP 7.0 on production server. Normally when you update composer would happily install versions that need 7.1 and the resulting composer.lock would be useless on your production server. However when you set platform to 7.0 composer will not use such versions even if you're using 7.1 when running composer update.

This is in fact the only good option when you need to resolve all cascade dependencies correctly for an out-dated project.

from instantiator.

alcaeus avatar alcaeus commented on September 27, 2024 1

Older versions still require whatever they require before. It’s also perfectly possible to get older versions when using an old PHP version. See http://doctrine-project.org/2017/07/25/php-7.1-requirement-and-composer.html

from instantiator.

elton182 avatar elton182 commented on September 27, 2024

Perfect! I did not know that composer updates take into account the php version on my system.

from instantiator.

elton182 avatar elton182 commented on September 27, 2024

Thanks @enumag, that's exactly what I did! It's the same case, I have php7.1 locally and 7.0 on production.

from instantiator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.