Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingFile - with composer v2.2.x #7226

Closed
bzajacc opened this issue Dec 27, 2021 · 7 comments
Closed

MissingFile - with composer v2.2.x #7226

bzajacc opened this issue Dec 27, 2021 · 7 comments

Comments

@bzajacc
Copy link

bzajacc commented Dec 27, 2021

When using composer:latest and run bin/psalm we getting error:

image

ERROR: MissingFile - �
17 include("composer-bin-proxy://" . __DIR__ . '/..'.'/vendor/vimeo/psalm/psalm');

When locking composer to v2.1 - works fine.

@psalm-github-bot
Copy link

Hey @bzajacc, can you reproduce the issue on https://psalm.dev ?

@orklah
Copy link
Collaborator

orklah commented Dec 27, 2021

Can you tell us the path of the analyzed file? Is it your own code or a dependency that is being analyzed here?

@bzajacc
Copy link
Author

bzajacc commented Dec 27, 2021

This is my psalm.xml.

<?xml version="1.0"?>
<psalm
  errorLevel="2"
  resolveFromConfigFile="true"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="https://getpsalm.org/schema/config"
  xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
  <projectFiles>
    <directory name="src" />
    <ignoreFiles>
      <directory name="vendor" />
    </ignoreFiles>
  </projectFiles>
</psalm>

It analyze my own code.

@iambrosi
Copy link

The same thing happened to me with the latest composer. I fixed it by ignoring bin/psalm in psalm's config. I wonder if psalm should not skip analysis of this file unless explicitly included in psalm's config.

@weirdan
Copy link
Collaborator

weirdan commented Dec 27, 2021

This is a binary proxy generated by composer.

@vstm
Copy link
Contributor

vstm commented Dec 29, 2021

Yes composer 2.2 stopped using symlinks for "aliasing" binaries in composer packages in bin-dir. PR #7210 improves the $argv handling so that the "proxy" file is not accidentally considered a file to be scanned.

@bzajacc
Copy link
Author

bzajacc commented Dec 29, 2021

@vstm thanks for info :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants