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

PHPStan Fixes #998

Merged
merged 3 commits into from
Jan 27, 2025
Merged

PHPStan Fixes #998

merged 3 commits into from
Jan 27, 2025

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Jan 23, 2025

No description provided.

@willpower232
Copy link
Contributor

This is looking good, thanks for fixing them. Definitely covered the ones I couldn't get round my head but apparently now it is sad about the config

 ------ ---------------------------------------------------------------------------------------------------------- 
  Line   config/audit.php                                                                                          
 ------ ---------------------------------------------------------------------------------------------------------- 
  5      Called 'env' outside of the config directory which returns null when the config is cached, use 'config'.  
         🪪  larastan.noEnvCallsOutsideOfConfig                                                                    
 ------ ---------------------------------------------------------------------------------------------------------- 

Is it worth starting a new branch for v14 which can include larastan 3.0 and drop PHP 7 etc? Then we could have a phpstan.neon config file which this error could be ignored in.

@willpower232
Copy link
Contributor

I also wonder if it would be worth locking in to specific versions of phpstan and larastan so that random new errors don't crop up all the time.

@erikn69
Copy link
Contributor Author

erikn69 commented Jan 24, 2025

Called 'env' outside of the config directory

I think I'll fix that by uploading the phpstan action

I also wonder if it would be worth locking in to specific versions of phpstan and larastan so that random new errors don't crop up all the time.

I was thinking of keeping it in action and always using the latest version, what do you think?
I want to avoid increasing the maintenance load

@willpower232
Copy link
Contributor

phpstan is really good at adding more checks every new version so if it wasn't locked at a particular version, new PRs would end up triggering errors in code they hadn't changed.

Obviously we can't have a composer.lock file so I think the best way would be having the specific version number without the ^ in composer.json and then it would work exactly the same locally as it does in actions

@erikn69
Copy link
Contributor Author

erikn69 commented Jan 24, 2025

Whatever, this PR does not add any github action, nor does it change the composer.json
The discussion would not be here

@erikn69 erikn69 mentioned this pull request Jan 24, 2025
@erikn69 erikn69 merged commit f789933 into owen-it:master Jan 27, 2025
17 checks passed
@erikn69 erikn69 deleted the phpstan_fixes branch January 27, 2025 13:37
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.

4 participants