Skip to content

php-watcher has unmet requirements #70

Open
@SlausB

Description

@SlausB

I'm trying to install php-watcher within latest composer docker with composer require seregazhuk/php-watcher command, but getting error:

Package seregazhuk/php-watcher has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version

Docker container has Composer version 2.0.11 2021-02-24 14:57:23 and PHP 8.0.3 (cli) (built: Mar 6 2021 03:28:33) ( NTS ).

I'm new to PHP and not sure what composer require --ignore-platform-reqs seregazhuk/php-watcher is doing, but after that ./vendor/bin/php-watcher app.php gives:

Fatal error: Uncaught Error: Undefined constant "seregazhuk\PhpWatcher\Config\SIGINT" in /app/vendor/seregazhuk/php-watcher/src/Config/Config.php:40
Stack trace:
#0 /app/vendor/seregazhuk/php-watcher/src/Config/Builder.php(21): seregazhuk\PhpWatcher\Config\Config::fromArray(Array)
#1 /app/vendor/seregazhuk/php-watcher/src/WatcherCommand.php(73): seregazhuk\PhpWatcher\Config\Builder->fromConfigFile('')
#2 /app/vendor/seregazhuk/php-watcher/src/WatcherCommand.php(42): seregazhuk\PhpWatcher\WatcherCommand->buildConfig(Object(Symfony\Component\Console\Input\ArgvInput))
#3 /app/vendor/symfony/console/Command/Command.php(256): seregazhuk\PhpWatcher\WatcherCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /app/vendor/symfony/console/Application.php(971): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /app/vendor/symfony/console/Application.php(290): Symfony\Component\Console\Application->doRunCommand(Object(seregazhuk\PhpWatcher\WatcherCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /app/vendor/symfony/console/Application.php(166): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /app/vendor/seregazhuk/php-watcher/php-watcher(18): Symfony\Component\Console\Application->run()

And now composer check-platform-reqs outputs:

Checking platform requirements for packages in the vendor dir
ext-curl      8.0.3                                                 success  
ext-json      8.0.3                                                 success  
ext-mbstring  8.0.3                                                 success  
ext-pcntl     n/a    seregazhuk/php-watcher requires ext-pcntl (*)  missing  
php           8.0.3  seregazhuk/php-watcher requires php (^7.2)     failed   

Is there a way I could use php-watcher in such setup?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions