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

trevorpan's avatar

patch releases in laravel forge too old

Hello there ~

Using global Composer installation.
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php ^8.0.6 but your PHP version (8.0.5) does not satisfy that requirement.

How do you get this specific version?

0 likes
6 replies
tykus's avatar

You can run composer with the --ignore-platform-reqs flag

trevorpan's avatar

Hi @tykus

Yea, I gave that a go here:

cd {{release}}

php artisan horizon:purge
php artisan horizon:terminate

php artisan view:clear
php artisan event:clear
php artisan config:clear
php artisan cache:clear
php artisan route:clear

composer clearcache
composer dump-autoload
composer update
composer install --no-dev --no-scripts --ignore-platform-reqs

But still had that issue. Any ideas why?

Tried it without composer update and with.

trevorpan's avatar

interesting - you've got tricks up both sleeves!

is this how you'd do that?

"require": {
        "php": "^8.0.6",
...

goes to

"require": {
        {"php": "^8.0.5", "php": "^8.0.6"},
...
trevorpan's avatar

@tykus

Well, another dev said, "do your packages require 8.0.6?" Wasn't sure, so I notched it down to ^8.0.5 that did the trick.

But the painful thing is why would a local dev bring in 8.0.6 but forge bring in 8.0.5? I'll reach out and let you know...

tykus's avatar

The earlier suggestion was to use the config key in the composer.json to fake a PHP version. I would not be liberal with its use; only in the circumstances such as yours, for a patch release. The point is some dependency has specified a minimum 8.0.6 version, so you need to find a way to either support or fake that requirement. This should be a temporary measure until Forge supports the minimum requirement of that particular package.

Please or to participate in this conversation.