Skip to content

"composer update --with=" isn't respected #12335

@Uplink03

Description

@Uplink03

My composer.json:

{
    "require": {
        "illuminate/support": "^8.4 || ^9.4 || ^10.4 || ^11.33",
        "orchestra/testbench": "^6.7 || ^7.0 || ^8.0 || ^9.0",
        "monolog/monolog": "^2.3 || ^3.8",
        "phpnexus/cwh": "^3.1"
    }
}

Output of composer diagnose:

Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK git version 2.39.5
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK does not expire
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking Composer version: OK
Checking Composer and its dependencies for vulnerabilities: OK
Composer version: 2.8.6
PHP version: 8.1.31
PHP binary path: /usr/local/bin/php
OpenSSL version: OpenSSL 3.0.15 3 Sep 2024
curl version: 7.88.1 libz 1.2.13 ssl OpenSSL/3.0.15
zip: extension present, unzip present, 7-Zip not available

When I run this command:

composer update --with='illuminate/support:^8' --dry-run

I get the following output:

See attached composer.out.txt

And I expected this to happen:

I expected to get the laravel/framework:^8 (it replaces illuminate/support), but instead get laravel/framework:^10.

In addition, laravel/framework:^8 is not compatible with my set up as described in this ticket, so it should throw a conflict error.

See the attached composer.expected.txt with the output of composer require 'illuminate/support:^8' --dry-run

composer.expected.txt
composer.out.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions