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

add possibility to use custom bin-folder for composer #15

Merged
merged 3 commits into from
May 17, 2024

Conversation

tomasnorre
Copy link
Contributor

This PR resolves issue #14.

I still haven't tested it fully, as I get some errors when testing locally or with my fork as git repo.

If I run it on my TYPO3 Crawler repository, which has a custom bin-folder, I get the following error.

$ .Build/bin/phpstan-bodyscan

In JsonLoader.php line 20:
                                                                                        
  Could not decode JSON from phpstan: "At least one path must be specified to analyse.  
  "                                                                                     

In JsonLoader.php line 18:
                
  Syntax error  

The repository have a valid phpstan.neon file, so I don't know what I'm overlooking.

I went for the simple implementation and used file_get_content of the composer.json to avoid pulling in an additional dependency.

@TomasVotruba
Copy link
Owner

Thanks for the PR 👍

I'll merge it, as it solves the custom vendor dir issue 💪


The follow up issue is probably this one: #11
We'll need a way to pick up paths from phpstan.neon instead of the hardcoded ones

@TomasVotruba TomasVotruba merged commit 8089373 into TomasVotruba:main May 17, 2024
5 checks passed
@tomasnorre
Copy link
Contributor Author

You're right, looks like that issue. I can confirm it by adding my Classes directly to https://github.com/TomasVotruba/phpstan-bodyscan/blob/main/src/Process/AnalyseProcessFactory.php#L20.

Thanks for merging it.

@Hackwar
Copy link

Hackwar commented May 21, 2024

Thanks for taking this up.

@tomasnorre tomasnorre deleted the issue/14 branch May 21, 2024 13:08
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 this pull request may close these issues.

3 participants