Skip to content

chore: handle intentional d() calls in static analysis#10279

Merged
samsonasik merged 2 commits into
codeigniter4:developfrom
datamweb:chore/fix-phpstan-d-function
Jun 5, 2026
Merged

chore: handle intentional d() calls in static analysis#10279
samsonasik merged 2 commits into
codeigniter4:developfrom
datamweb:chore/fix-phpstan-d-function

Conversation

@datamweb
Copy link
Copy Markdown
Contributor

@datamweb datamweb commented Jun 5, 2026

Description

Note: Using configuration file /home/runner/work/CodeIgniter4/CodeIgniter4/phpstan.neon.dist.
   0/987 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0% < 1 sec
 200/987 [▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░]  20% 15 secs
 700/987 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░]  70% 34 secs
 987/987 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 50 secs

Error: Call to function d() on a separate line has no effect.
Error: Call to function d() on a separate line has no effect.
 ------ -------------------------------------------------------- 
  Line   system/Commands/Utilities/ConfigCheck.php               
 ------ -------------------------------------------------------- 
  129    Call to function d() on a separate line has no effect.  
         🪪  function.resultUnused                               
 ------ -------------------------------------------------------- 

 ------ -------------------------------------------------------- 
  Line   tests/system/CommonFunctionsTest.php                    
 ------ -------------------------------------------------------- 
  741    Call to function d() on a separate line has no effect.  
         🪪  function.resultUnused                               
 ------ -------------------------------------------------------- 


 [ERROR] Found 2 errors                                                         

See :
https://github.com/codeigniter4/CodeIgniter4/actions/runs/27015062672/job/79727861345?pr=10278
Checklist:

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

Comment thread system/Commands/Utilities/ConfigCheck.php Outdated
Comment thread tests/system/CommonFunctionsTest.php Outdated
@datamweb datamweb requested a review from samsonasik June 5, 2026 14:05
@samsonasik samsonasik merged commit ba1d524 into codeigniter4:develop Jun 5, 2026
4 checks passed
@samsonasik
Copy link
Copy Markdown
Member

Thank you @datamweb

@datamweb datamweb deleted the chore/fix-phpstan-d-function branch June 5, 2026 14: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.

2 participants