skip to Main Content

On a Windows 10 laptop used for personal development projects XAMPP is installed and is running PHP 7.3.10. Composer version 1.9.0 is also installed on this machine. It is time for an upgrade of XAMPP in order to get PHP 7.4.10. It seems I read somewhere quite a while ago that Composer has to be updated if the PHP minor version changes. Is that true? If so, should Composer be upgraded before or after PHP is upgraded?

2

Answers


  1. I think you don’t need to do this. I’m using multiple PHP version with same composer’s version and it run properly. But if you still want to upgrade composer, just run composer with specific PHP version. for example:

    C:fullpathtophp.exe C:fullpathtocomposer.phar self-update
    
    Login or Signup to reply.
  2. Can you share any of the sources that recommend doing that as a general case? I’ve never heard of it and you can generally assume that a single version of Composer will work over a wide span of PHP versions.

    As you can see on https://github.com/composer/composer/tree/1.9.0, v1.9.0 of Composer is more than a year old, so updating it might be a good idea in all cases. In the changelogs, I’ve found some fixed for the compatibility of Composer with PHP 7.4, so an update might be a good idea. The good thing: the latest version of Composer v1 is still compatible with PHP down to v5.3 (which is really old!), and can thus also be used for your current setup of PHP 7.3

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search