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

fix: PHPStan errors #8034

Merged
merged 2 commits into from
Oct 12, 2023
Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Oct 12, 2023

Description
See https://github.com/CodeIgniter/phpstan-codeigniter/releases/tag/v1.4.0

  ------ ----------------------------------------------------------------------- 
  Line   system/CLI/BaseCommand.php                                             
 ------ ----------------------------------------------------------------------- 
  127    Call to function config with Config\Exceptions::class is discouraged.  
         💡 Use config('Exceptions') instead to allow overriding.               
 ------ ----------------------------------------------------------------------- 

https://github.com/codeigniter4/CodeIgniter4/actions/runs/6490312938/job/17625890673

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

If we specifies FQCN, Config\Factory is not loaded since CI v4.4.0.
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only qualm with this new rule is that it hides dependencies from Deptrac. I think Config is fine as a globally-available dependency so I'm not too worried about it, but I did like the easily-built dependency graph.

@kenjis
Copy link
Member Author

kenjis commented Oct 12, 2023

I don't want the GitHub action check to always fail, so I'll merge it in for now.

@kenjis kenjis merged commit 52dbf70 into codeigniter4:develop Oct 12, 2023
60 checks passed
@kenjis kenjis deleted the fix-phpstan-ci-errors branch October 12, 2023 11:32
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.

2 participants