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

Functions declared in the same file are reported as unknown #179

Open
julienfalque opened this issue Feb 5, 2020 · 3 comments · May be fixed by #193
Open

Functions declared in the same file are reported as unknown #179

julienfalque opened this issue Feb 5, 2020 · 3 comments · May be fixed by #193

Comments

@julienfalque
Copy link
Contributor

It seems that ComposerRequireChecker isn't able to detect when called functions are declared in the same file. For example, with the following file:

<?php

namespace App;

function foo() { }

function bar() {
    foo();
}

ComposerRequireChecker will report the following error:

+----------------+--------------------+
| unknown symbol | guessed dependency |
+----------------+--------------------+
| foo            |                    |
+----------------+--------------------+

Is this the expected behavior?

@vudaltsov
Copy link

+1
I use functions a lot and this issue is quite annoying.
Looking forward to a fix, thanx.

@vudaltsov
Copy link

@maglnet , @Ocramius , any plans to fix this?

@Ocramius
Copy link
Collaborator

@vudaltsov patches welcome: this should be easy to test, but unsure about the fix.

I don't currently have capacity to work on this project within the next few months.

@vudaltsov vudaltsov linked a pull request Jul 11, 2020 that will close this issue
2 tasks
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

Successfully merging a pull request may close this issue.

3 participants