Skip to content

Instantly share code, notes, and snippets.

@vstm
Created December 24, 2021 12:58
Show Gist options
  • Save vstm/40258de6df2991cf9309cd10e716089b to your computer and use it in GitHub Desktop.
Save vstm/40258de6df2991cf9309cd10e716089b to your computer and use it in GitHub Desktop.
psalm / composer 2.2 / bin-dir issue
psalm-bin-test composer about
Composer - Dependency Manager for PHP - version 2.2.1
Composer is a dependency manager tracking local dependencies of your projects and libraries.
See https://getcomposer.org/ for more information.psalm-bin-test cat > composer.json 
{
    "name": "vstm/psalm-bin-test",
    "require-dev": {
        "vimeo/psalm": "dev-master"
    },
    "config": {
        "bin-dir": "bin",
        "allow-plugins": {
            "composer/package-versions-deprecated": true
        }
    }
}
^Dpsalm-bin-test mkdir -p src ; echo '<?php $fail->fail(); ' > src/Test.php psalm-bin-test composer install -qpsalm-bin-test ./bin/psalm --init
Calculating best config level based on project files
Calculating best config level based on project files
Target PHP version: 7.4 (inferred from current PHP version)
Scanning files...
psalm-bin-test ./bin/psalm 
Target PHP version: 7.4 (inferred from current PHP version)
Scanning files...
Analyzing files...

E

To whom it may concern: Psalm cannot detect unused classes, methods and properties
when analyzing individual files and folders. Run on the full project to enable
complete unused code detection.

ERROR: MissingFile - bin/psalm:92:9 - Cannot find file composer-bin-proxy:/home/stefan/Projects/temp-test/psalm-stuff/psalm-bin-test/vendor/vimeo/psalm/psalm to include (see https://psalm.dev/107)
        include("composer-bin-proxy://" . __DIR__ . '/..'.'/vendor/vimeo/psalm/psalm');


------------------------------
1 errors found
------------------------------

Checks took 2.41 seconds and used 161.218MB of memory
Psalm was unable to infer types in the codebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment