Skip to content

refactor: migrate config:check as a modern command#10355

Open
paulbalandan wants to merge 1 commit into
codeigniter4:4.8from
paulbalandan:config-check-modern
Open

refactor: migrate config:check as a modern command#10355
paulbalandan wants to merge 1 commit into
codeigniter4:4.8from
paulbalandan:config-check-modern

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
Follow up to #10120

This PR also renames some of the error messages to be more descriptive and natural.

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

@github-actions github-actions Bot added the 4.8 PRs that target the `4.8` branch. label Jun 30, 2026
@paulbalandan paulbalandan added the refactor Pull requests that refactor code label Jun 30, 2026
@paulbalandan paulbalandan force-pushed the config-check-modern branch from 26beec9 to f34cb7a Compare June 30, 2026 13:43
@paulbalandan

Copy link
Copy Markdown
Member Author

I have revised the refactor to preserve the original behavior, i.e. it errors when the required argument is not provided. Previously, I added interactive prompting. Only difference now with develop is this is now depending on AbstractCommand's validation of missing required args instead of hand-rolling our own.

@michalsn michalsn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good.

Question. Should the user guide explicitly mention that command() does not catch exceptions, including validation exceptions from modern commands, and that callers should be prepared for it?

@datamweb datamweb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds good to me. I agree that documenting this behavior in the user guide would help set expectations.

@paulbalandan

Copy link
Copy Markdown
Member Author

Thanks all! Added note in #10360

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.8 PRs that target the `4.8` branch. refactor Pull requests that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants