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

Should required files be the same as inlined or autoloaded? #3452

Open
bitwombat opened this issue Jun 11, 2020 · 0 comments
Open

Should required files be the same as inlined or autoloaded? #3452

bitwombat opened this issue Jun 11, 2020 · 0 comments

Comments

@bitwombat
Copy link

@bitwombat bitwombat commented Jun 11, 2020

Using either 0.12.25 or b969cdb, running the attached testcase:

vendor/phpstan analyse --level max -c testcase_require/phpstan.neon testcase_require/Module.php

An error is reported.

However, if all those files are require(d) in an App.php, and PHPStan is run on the that top level file:

vendor/phpstan analyse --level max testcase_require/App.php

...then no errors are reported.

php -f doesn't report any trouble.

I might be missing something with how PHP works, as I'm always using an autoloader.

(edited to update zip with minor code fixes - results are the same)

testcase_require.zip

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.