psalm / psalm-plugin-laravel

A Psalm plugin for Laravel
MIT License
306 stars 71 forks source link

Upgrade of psalm/plugin-laravel requires downgrade of barryvdh/laravel-ide-helper #196

Closed MaartenStaa closed 3 years ago

MaartenStaa commented 3 years ago

Describe the bug The dependant version of barryvdh/laravel-ide-helper seems to be stricter than necessary. It is set to >=2.8.0 <2.9.2. Possibly version 2.9.2 contained a bug? By now, the IDE helper package is at version 2.10.0, so an upgrade of the Psalm plugin would require a downgrade of the IDE helper package.

Impacted Versions Version 1.5.x

Additional context

bash-3.2$ composer outdated --direct
(snip)
psalm/plugin-laravel  v1.4.6  v1.5.1  A Laravel plugin for Psalm

bash-3.2$ composer require --dev psalm/plugin-laravel
Using version ^1.5 for psalm/plugin-laravel
./composer.json has been updated
Running composer update psalm/plugin-laravel
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - psalm/plugin-laravel[v1.5.0, ..., v1.5.1] require barryvdh/laravel-ide-helper >=2.8.0 <2.9.2 -> found barryvdh/laravel-ide-helper[v2.8.0, ..., v2.9.1] but the package is fixed to v2.10.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - Root composer.json requires psalm/plugin-laravel ^1.5 -> satisfiable by psalm/plugin-laravel[v1.5.0, v1.5.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

bash-3.2$ composer require --dev psalm/plugin-laravel --with-all-dependencies
Using version ^1.5 for psalm/plugin-laravel
./composer.json has been updated
Running composer update psalm/plugin-laravel --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 2 updates, 0 removals
  - Downgrading barryvdh/laravel-ide-helper (v2.10.0 => v2.9.1)
  - Upgrading psalm/plugin-laravel (v1.4.6 => v1.5.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 2 updates, 0 removals
  - Downgrading barryvdh/laravel-ide-helper (v2.10.0 => v2.9.1): Extracting archive
  - Upgrading psalm/plugin-laravel (v1.4.6 => v1.5.1): Extracting archive
(snip)

bash-3.2$ composer outdated --direct
(snip)
barryvdh/laravel-ide-helper v2.9.1  v2.10.0 Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-c...
tm1000 commented 3 years ago

See: https://github.com/psalm/psalm-plugin-laravel/pull/154