phpunit-watcher icon indicating copy to clipboard operation
phpunit-watcher copied to clipboard

Add suport for PHP 8.2

Open heitorvrb opened this issue 2 years ago • 6 comments

Hi, when I try to install this package on a Laravel 10 new application with PHP 8.2, I get the following:

$ composer require spatie/phpunit-watcher --dev
./composer.json has been updated
Running composer update spatie/phpunit-watcher
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - spatie/phpunit-watcher[1.23.5, ..., 1.23.6] require yosymfony/resource-watcher ^2.0 | ^3.0 -> satisfiable by yosymfony/resource-watcher[v2.0.0, v2.0.1, v3.0.0].
    - spatie/phpunit-watcher[0.0.1, ..., 0.0.2, 1.0.0, ..., 1.8.3] require php ^7.0 -> your php version (8.2.13) does not satisfy that requirement.
    - spatie/phpunit-watcher[1.10.0, ..., 1.10.1] require php ^7.1 -> your php version (8.2.13) does not satisfy that requirement.
    - spatie/phpunit-watcher[1.11.0, ..., 1.23.0] require php ^7.2 -> your php version (8.2.13) does not satisfy that requirement.
    - spatie/phpunit-watcher 1.23.1 requires symfony/console ^5.0 -> found symfony/console[v5.0.0, ..., v5.4.32] but the package is fixed to v6.3.8 (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.
    - spatie/phpunit-watcher[1.23.2, ..., 1.23.4] require symfony/console ^5.2 -> found symfony/console[v5.2.0, ..., v5.4.32] but the package is fixed to v6.3.8 (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.
    - yosymfony/resource-watcher v2.0.0 requires symfony/finder ^2.7|^3.0|^4.0 -> found symfony/finder[v2.7.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.44] but the package is fixed to v6.3.5 (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.
    - yosymfony/resource-watcher[v2.0.1, v3.0.0] require symfony/finder ^2.7|^3.0|^4.0|^5.0 -> found symfony/finder[v2.7.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.44, v5.0.0, ..., v5.4.27] but the package is fixed to v6.3.5 (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 spatie/phpunit-watcher * -> satisfiable by spatie/phpunit-watcher[0.0.1, 0.0.2, 1.0.0, ..., 1.23.6].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require spatie/phpunit-watcher:*" to figure out if any version is installable, or "composer require spatie/phpunit-watcher:^2.1" if you know which you need.

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

heitorvrb avatar Nov 30 '23 14:11 heitorvrb

Yes I have the same problem

./composer.json has been updated
Running composer update spatie/phpunit-watcher
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - spatie/phpunit-watcher[1.23.5, ..., 1.23.6] require yosymfony/resource-watcher ^2.0 | ^3.0 -> satisfiable by yosymfony/resource-watcher[v2.0.0, v2.0.1, v3.0.0].
    - spatie/phpunit-watcher[0.0.1, ..., 0.0.2, 1.0.0, ..., 1.8.3] require php ^7.0 -> your php version (8.2.4) does not satisfy that requirement.
    - spatie/phpunit-watcher[1.10.0, ..., 1.10.1] require php ^7.1 -> your php version (8.2.4) does not satisfy that requirement.
    - spatie/phpunit-watcher[1.11.0, ..., 1.23.0] require php ^7.2 -> your php version (8.2.4) does not satisfy that requirement.
    - spatie/phpunit-watcher 1.23.1 requires symfony/console ^5.0 -> found symfony/console[v5.0.0-BETA1, ..., v5.4.32] but the package is fixed to v6.4.1 (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.
    - spatie/phpunit-watcher[1.23.2, ..., 1.23.4] require symfony/console ^5.2 -> found symfony/console[v5.2.0-BETA1, ..., v5.4.32] but the package is fixed to v6.4.1 (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.
    - yosymfony/resource-watcher v2.0.0 requires symfony/finder ^2.7|^3.0|^4.0 -> found symfony/finder[v2.7.0-BETA1, ..., v2.8.52, v3.0.0-BETA1, ..., v3.4.47, v4.0.0-BETA1, ..., v4.4.44] but the package is fixed to v6.4.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.
    - yosymfony/resource-watcher[v2.0.1, v3.0.0] require symfony/finder ^2.7|^3.0|^4.0|^5.0 -> found symfony/finder[v2.7.0-BETA1, ..., v2.8.52, v3.0.0-BETA1, ..., v3.4.47, v4.0.0-BETA1, ..., v4.4.44, v5.0.0-BETA1, ..., v5.4.27] but the package is fixed to v6.4.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 spatie/phpunit-watcher * -> satisfiable by spatie/phpunit-watcher[0.0.1, 0.0.2, 1.0.0, ..., 1.23.6].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require spatie/phpunit-watcher:*" to figure out if any version is installable, or "composer require spatie/phpunit-watcher:^2.1" if you know which you need.

Sad that we cannot use it. php 8.2 and 8.3 already in use and even in production

websitevirtuoso avatar Dec 08 '23 18:12 websitevirtuoso

I created a pull request for allowing php8.2 -> https://github.com/spatie/phpunit-watcher/pull/158

digitalgopnik avatar Dec 21 '23 17:12 digitalgopnik

This issue will be resolved with yosymfony/resource-watcher#12

KentarouTakeda avatar Dec 22 '23 08:12 KentarouTakeda

what about 8.3?

websitevirtuoso avatar Dec 22 '23 17:12 websitevirtuoso

It can be easy just clone this https://github.com/yosymfony/ repo and accept this PR. and even implement 8.3.

websitevirtuoso avatar Dec 22 '23 17:12 websitevirtuoso

Any solution for this problem?

cleberar avatar Dec 29 '23 14:12 cleberar

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.

spatie-bot avatar Apr 30 '24 10:04 spatie-bot