Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

imBee's avatar
Level 1

This package requires php ^7.2 but your PHP version (7.1.23)

Hello,

I'm using macOS 10.14.6, I updated PHP and when I run "php -v" in terminal it shows: PHP 7.3.8 (cli) (built: Aug 11 2019 20:50:16) ( NTS )

But still, when I try to install Laravel I'm getting this error: Your requirements could not be resolved to an installable set of packages.

  • This package requires php ^7.2 but your PHP version (7.1.23) does not satisfy that requirement.

Any ideas about how to fix this?

0 likes
5 replies
Nakov's avatar

That's because composer still sees the old version I guess, try running this:

composer --self-update
1 like
imBee's avatar
Level 1

Thank you, what finally worked, was using brew to install PHP 7.3 again...

brew install [email protected]

Leaving this here in case some one else has this issue.

1 like
felloz's avatar

I did that, now im getting this error

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255

felloz's avatar

[Symfony\Component\Console\Exception\RuntimeException] The "--self-update" option does not exist.

Please or to participate in this conversation.