Skip to content

fix: handle null ini values in phpini check#10233

Open
Will-thom wants to merge 1 commit into
codeigniter4:developfrom
Will-thom:fix/random-order-commands-tests
Open

fix: handle null ini values in phpini check#10233
Will-thom wants to merge 1 commit into
codeigniter4:developfrom
Will-thom:fix/random-order-commands-tests

Conversation

@Will-thom
Copy link
Copy Markdown

Refs #9968.

Summary

  • Normalize null values returned by ini_get_all() before rendering phpini:check output.
  • Prevent CLI color/table rendering from receiving null for directives such as request_order or error_reporting on newer PHP runtimes.

Tests

  • vendor/bin/phpunit --no-coverage tests/system/Commands/Utilities/PhpIniCheckTest.php
  • vendor/bin/phpunit --no-coverage --order-by=random --random-order-seed=12345 tests/system/Commands
  • utils/vendor/bin/php-cs-fixer check --ansi --verbose --diff system/Security/CheckPhpIni.php

@mergeable
Copy link
Copy Markdown

mergeable Bot commented May 23, 2026

Hi there, Will-thom! 👋

Thank you for sending this PR!

We expect the following in all Pull Requests (PRs).

Important

We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works.

If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work
on the framework than you do. Please make it as painless for your contributions to be included as possible.

See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md

Sincerely, the mergeable bot 🤖

@Will-thom Will-thom changed the title Fix phpini check with null ini values fix: handle null ini values in phpini check May 23, 2026
@michalsn
Copy link
Copy Markdown
Member

@Will-thom Thank you for the PR. We require commits to be signed, please see this: https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md#gpg-signing-old-commits

Please also rebase to the latest develop.

Copy link
Copy Markdown
Member

@paulbalandan paulbalandan left a comment

Choose a reason for hiding this comment

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

Please add one test in CheckPhpIniTest, and add a changelog entry

@paulbalandan paulbalandan added bug Verified issues on the current code behavior or pull requests that will fix them tests needed Pull requests that need tests docs needed Pull requests needing documentation write-ups and/or revisions. labels May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them docs needed Pull requests needing documentation write-ups and/or revisions. tests needed Pull requests that need tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants