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

Non-Standard Laravel Location Support? #1783

Closed
marktinsley opened this issue Nov 29, 2023 · 3 comments
Closed

Non-Standard Laravel Location Support? #1783

marktinsley opened this issue Nov 29, 2023 · 3 comments

Comments

@marktinsley
Copy link

Description

Hey! I was just wondering if there is or will be support for non-standard locations for Laravel directories.

In a project I'm working in, it's being transitioned to Laravel. Right now, the app/ directory is not in the root of the repo but under a directory that is in the root of the repo.

Larastan is having trouble finding Laravel's bootstrap file. I think that directory difference is why.

Note: Using configuration file /var/www/html/phpstan.neon.
Exception thrown in /var/www/html/vendor/nunomaduro/larastan/bootstrap.php on line 22 while loading bootstrap file /var/www/html/vendor/nunomaduro/larastan/bootstrap.php: Could not find Laravel bootstrap file nor Testbench is installed. Install orchestra/testbench if analyzing a package.
@szepeviktor
Copy link
Collaborator

Hello Mark!
Thank you for your report.

Although I cannot answer your question you can modify our bootstrap code right now.
https://github.com/nunomaduro/larastan/blob/51028c0aba0d8756f7d9e9972ed74e7d34976958/bootstrap.php#L17

@szepeviktor
Copy link
Collaborator

... or you may start PHPStan from the folder where bootstrap/app.php is.
https://github.com/nunomaduro/larastan/blob/51028c0aba0d8756f7d9e9972ed74e7d34976958/bootstrap.php#L15

@marktinsley
Copy link
Author

... or you may start PHPStan from the folder where bootstrap/app.php is.

https://github.com/nunomaduro/larastan/blob/51028c0aba0d8756f7d9e9972ed74e7d34976958/bootstrap.php#L15

This worked fine! Thank you!

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

2 participants