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

ci: add phpstan updates #63

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from
Open

Conversation

millnut
Copy link
Member

@millnut millnut commented Aug 10, 2024

What does this change?

This PR adds the same PHPStan checks as the main project as well as adding an extra quality gate check to the static analysis check to make sure there are no disallowed/dangerous/insecure calls in the codebase, such as:

  • var_dump()
  • print_r()
  • phpinfo()
  • exec(), shell_exec(), etc...

A baseline PHPStan file has also been generated, and the errors reported within can be looked at over time.

How to test

Run lando sca

@ekes
Copy link
Member

ekes commented Aug 13, 2024

Well the var_dump it picks up shouldn't be there :-) I'll make a PR. I assume if there are any that should be for some reason, they can be excluded explicitly so makes sense.

Assuming the other errors are not related?

ekes added a commit to localgovdrupal/localgov_microsites_group that referenced this pull request Aug 13, 2024
@millnut
Copy link
Member Author

millnut commented Aug 13, 2024

Nope other errors are not related. However when I looked at those it looked like preview_link was not installed so it is likely highlighting this. We install prevew_link in https://github.com/localgovdrupal/localgov/blob/3.x/composer.json but I'm not seeing it in https://github.com/localgovdrupal/localgov_microsites/blob/4.x/composer.json

@ekes
Copy link
Member

ekes commented Aug 13, 2024

We install prevew_link in https://github.com/localgovdrupal/localgov/blob/3.x/composer.json but I'm not seeing it in https://github.com/localgovdrupal/localgov_microsites/blob/4.x/composer.json

Let's see was that one of the MRs that went into 3.x first, rather than 4.x and backported.

Ah! It's been added to localgov not microsites.

Guess we need to make an issue to add it to microsites (and possibly check it works - with the domains and all!), or somehow resolve that conflict.

@finnlewis
Copy link
Member

Here's an issue to look at adding and enabling preview_link:
localgovdrupal/localgov_microsites#478

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