0

So I am currently trying to set up an old Laravel project, which requires PHP 7.1. I have successfully downgraded from 8.1 to 7.1, but now the composer issue appears:enter image description here

I am trying to run composer install on a project, in order to install the dependecies needed, but I am facing the composer version error. After running the suggested command, it basically shows the same error, which does not really make any sense. I have tried other commands but seems like the issue is the same.

I am using MAC.

Any idea?

Hoolis
  • 47
  • 6
  • Just tried using Sudo before the command line, still returns the same error, within the photo :/ – Hoolis May 28 '22 at 22:01
  • Restarted the computer, just in case it is somehow bugged, did not help either. Feeling a bit lost, any help is appreciated. – Hoolis May 28 '22 at 22:12

1 Answers1

0

The message tells you that the current version of Composer installed cannot be run with the current version of PHP installed. Even downgrading is not possible.

To overcome this, you could update PHP again to any supported version (as in: 7.2.5 or later), then downgrade Composer to v2.2, then downgrade PHP again to 7.1.

If you want to ease the switch between PHP versions, you could check for a containerized PHP setup using Docker.

Nico Haase
  • 11,420
  • 35
  • 43
  • 69