Open ricardosierra opened 1 month ago
The problem is in psalm 5/master. Requires phpunit 9, and not support phpunit 11
hey @ricardosierra thanks for the report!
PHPUnit should be a dev dependency, I'm not sure why there is a conflict 🤔 . Yes, you instead Psalm as a dev dependency, but, Psalm will not instal it's dev dependencies.
neither Psalm and psalm-laravel have phpunit as non-dev dependency: Psalm: https://github.com/vimeo/psalm/blob/02943245c48c7812e5e370e574e33fe9ec623f98/composer.json#L17-L41
psalm-laravel: https://github.com/psalm/psalm-plugin-laravel/blob/ffd51399b672959331ed3ef4eaae13984474e2f0/composer.json#L13-L30
UPD: I would like to move orchestra/testbench-core
to dev dependencies of this package, probably it will solve some issues (but can't guarantee it will solve this one)
UPD: it's caused by orchestral/testbench
https://github.com/orchestral/testbench/blob/9.x/composer.json#L30
But which package requested it?
can you please install your composer dependencies with --no-dev
key and then run composer why phpunit/phpunit
?
I can only install it if I remove phpunit 11 from my composer
"require": { "php": "^8.2|^8.3", "ext-gd": "", "ext-json": "", "ext-mbstring": "*", "laravel/framework": "^11.0", "laravel/sanctum": "^4.0", "laravel/tinker": "^2.9", "mll-lab/laravel-graphiql": "^3.2", "rebing/graphql-laravel": "^9.5" }, "require-dev": { "barryvdh/laravel-ide-helper": "^3.0", "fakerphp/faker": "^1.23", "laravel/pint": "^1.13", "laravel/sail": "^1.26", "mockery/mockery": "^1.6", "nunomaduro/collision": "^8.0", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^11.0.1", "spatie/laravel-ignition": "^2.4", "vimeo/psalm": "^5.20", "psalm/plugin-laravel": "dev-master" },
Hi @alies-dev. I can install changing phpunit for 10.5
` $ composer why phpunit/phpunit
banlek/api 0.4.0 requires (for development) phpunit/phpunit (^10.0.1|^11.0.1)
mockery/mockery 1.6.12 conflicts phpunit/phpunit (<8.0)
nunomaduro/collision v8.1.1 conflicts phpunit/phpunit (<10.5.1 || >=12.0.0)
orchestra/testbench-core v9.1.1 conflicts phpunit/phpunit (<10.5.0 || 11.0.0 || >=11.2.0)`
@alies-dev When I go back to phpunit 11, the error comes back even when I remove the mocking and collision.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
composer require --dev psalm/plugin-laravel -W
Describe the bug A clear and concise description of what the bug is.
The command: "composer require --dev psalm/plugin-laravel -W" not working
My composer.json:
Additional context Composer response:
You can also try re-running composer require with an explicit version constraint, e.g. "composer require psalm/plugin-laravel:*" to figure out if any version is installable, or "composer require psalm/plugin-laravel:^2.1" if you know which you need.
Or using dev-master version:
composer require --dev psalm/plugin-laravel:dev-master -W
./composer.json has been updated Running composer update psalm/plugin-laravel --with-all-dependencies Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.
Installation failed, reverting ./composer.json to its original content.