TheDragonCode/laravel-deploy-operations

Cannot install inside a fresh laravel 10 project

Closed this issue · 3 comments

Environment

  • PHP Version: 8.1
  • Database Driver & Version: mysql 8.0
  • Actions Version: ^4.2
  • Laravel Version: 10

Issue description

Composer install fails when installing inside a fresh laravel 10 project

Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - dragon-code/support[v6.0.1, ..., v6.11.0] require dragon-code/contracts ^2.18 -> found dragon-code/contracts[2.x-dev] but it does not match your minimum-stability.
    - dragon-code/laravel-actions dev-main requires dragon-code/support ^6.6 -> satisfiable by dragon-code/support[v6.6.0, ..., v6.11.0].
    - Root composer.json requires dragon-code/laravel-actions dev-main -> satisfiable by dragon-code/laravel-actions[dev-main].

Steps to reproduce

  1. Install Laravel 10
  2. composer require dragon-code/laravel-actions

Hi!

Check the value of the minimum-stability key in the composer.json. I recommend replacing it with stable instead of dev.

Due to the fact that your application is allowed to install dev versions, the composer tries to download unstable versions of packages.

The fact that the application uses the dev branch can be seen from the log - it writes the dev-main version.

So if your application has minimum-stability equal to dev, then when you run composer require dragon-code/laravel-actions , the composer will install the unstable "version" dev-main instead of the stable 4.2.

My steps to reproduce:

  1. laravel new test
  2. cd test
  3. composer require dragon-code/laravel-actions

The value of minimum-stability defaults to stable

If you need to have a stability level other than stable, you must explicitly specify the required version when installing dependencies. For example:

composer require dragon-code/laravel-actions:^4.2

image

Okay clear thanks! That was indeed the issue!

You're welcome!