Skip to content

Requirement Checker fails with Extension conflict #1584

@llaville

Description

@llaville

Bug report

Question Answer
Box version 4.6.10
PHP version 8.2.30
Platform with version Ubuntu 24.04 LTS on Docker and WSL2
Github Repo none source are required for this issue

Description

The requirement checker (https://github.com/box-project/box/blob/4.6.10/src/RequirementChecker/RequirementsBuilder.php#L94-L101)
did not take care to compare extension constraint and version available.

Context

Conflict between symfony/cache and redis PHP extension is only for version lower than 6.1 :

And I got version redis 6.3 installed

container  [Docker] > php --re redis | grep "redis version"
Extension [ <persistent> extension #71 redis version 6.3.0 ] {

If you extract (with BOX 4.6.10 extract command) the https://github.com/overtrue/phplint/releases/download/9.7.1/phplint.phar copy
and check into vendor/composer/installed.php file, you will see this chunk of content

        'symfony/cache' => array(
            'pretty_version' => 'v7.4.0',
            'version' => '7.4.0.0',
            'reference' => 'a7a1325a5de2e54ddb45fda002ff528162e48293',
            'type' => 'library',
            'install_path' => __DIR__ . '/../symfony/cache',
            'aliases' => array(),
            'dev_requirement' => false,
        ),

Expected results

container  [Docker] > ./phplint.phar --version
phplint 9.7.1@69ec670

Actual results

container  [Docker] > ./phplint.phar --version

Box Requirements Checker
========================

> Using PHP 8.2.30
> PHP is not using any php.ini file.

> Checking Box requirements:
  ......E.


 [ERROR] Your system is not ready to run the application.


Fix the following mandatory requirements:
=========================================

 * The package "symfony/cache" conflicts with the extension "redis". You need to disable it in order to run this application.

Workaround

container  [Docker] > BOX_REQUIREMENT_CHECKER=0 ./phplint.phar --version
phplint 9.7.1@69ec670

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions