Skip to content

Warning displays only when running composer outdated with working directory flag #12259

@ericfortmeyer

Description

@ericfortmeyer

My composer.json:

{
  "$schema": "https://getcomposer.org/schema.json",
  "name": "php-contrib/response-filter",
  "description": "Supports filtering PSR-7 HTTP Responses",
  "type": "library",
  "require-dev": {
    "squizlabs/php_codesniffer": "^3.7"
  },
  "autoload": {
    "psr-4": {
      "PhpContrib\\Http\\Message\\": "src/Http/Message/"
    }
  },
  "config": {
    "sort-packages": true
  },
  "require": {
    "php": ">=7",
    "psr/http-message": "^2.0"
  },
  "license": "MIT",
  "scripts": {
    "lint": "phpcs",
    "lint-fix": "phpcbf"
  }
}

Output of composer diagnose:

Checking composer.json: OK
Checking composer.lock: FAIL
stability-flags : Array value found, but an object is required
platform-dev : Array value found, but an object is required
Checking platform settings: OK
Checking git settings: OK git version 2.45.2
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
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-dev+fb397acaa0648ba2668893e4b786af6465a41696
PHP version: 8.3.11
PHP binary path: /usr/bin/php8.3
OpenSSL version: OpenSSL 3.0.2 15 Mar 2022
curl version: 8.9.1 libz 1.3.1 ssl OpenSSL/3.3.1
zip: extension present, unzip present, 7-Zip not available

When I run this command:

composer -d Projects/php-contrib/response-filter outdated -vvv

I get the following output:

Changed CWD to /home/efortmeyer/Projects/php-contrib/response-filter
Reading ./composer.json (/home/efortmeyer/Projects/php-contrib/response-filter/composer.json)
Loading config file /home/efortmeyer/.config/composer/config.json
Loading config file /home/efortmeyer/.config/composer/auth.json
Loading config file ./composer.json (/home/efortmeyer/Projects/php-contrib/response-filter/composer.json)
Checked CA file /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/home/efortmeyer/Projects/php-contrib/response-filter): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Failed to initialize global composer: Composer could not find the config file: /home/efortmeyer/.config/composer/composer.json

Reading ./composer.lock (/home/efortmeyer/Projects/php-contrib/response-filter/composer.lock)
Reading /home/efortmeyer/Projects/php-contrib/response-filter/vendor/composer/installed.json
Running 2.8-dev+fb397acaa0648ba2668893e4b786af6465a41696 (2024-12-11 10:57:45) with PHP 8.3.11 on Linux / 6.11.0-13-generic
Running 2.8-dev+fb397acaa0648ba2668893e4b786af6465a41696 (2024-12-11 10:57:45) with PHP 8.3.11 on Linux / 6.11.0-13-generic
A script named lint would override a Composer command and has been skipped
A script named lint-fix would override a Composer command and has been skipped
Reading /home/efortmeyer/.cache/composer/repo/https---repo.packagist.org/packages.json from cache
Downloading https://repo.packagist.org/packages.json if modified
[304] https://repo.packagist.org/packages.json
Reading /home/efortmeyer/.cache/composer/repo/https---repo.packagist.org/provider-psr~http-message.json from cache
Downloading https://repo.packagist.org/p2/psr/http-message.json if modified
[304] https://repo.packagist.org/p2/psr/http-message.json
Reading /home/efortmeyer/.cache/composer/repo/https---repo.packagist.org/provider-squizlabs~php_codesniffer.json from cache
Downloading https://repo.packagist.org/p2/squizlabs/php_codesniffer.json if modified
[304] https://repo.packagist.org/p2/squizlabs/php_codesniffer.json
Color legend:
- patch or minor release available - update recommended
- major release available - update possible

Direct dependencies required in composer.json:
squizlabs/php_codesniffer 3.7.2 3.11.2 PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined ...

Transitive dependencies not required in composer.json:
Everything up to date

And I expected this to happen:
The above output should not include:

A script named lint would override a Composer command and has been skipped
A script named lint-fix would override a Composer command and has been skipped

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions