Skip to content

fix: ask the CodeIgniter namespace confirmation once in make:cell and make:model - #10621

Merged
paulbalandan merged 1 commit into
codeigniter4:4.8from
paulbalandan:generator-fixes
Oct 13, 2026
Merged

paulbalandan merged 1 commit into
codeigniter4:4.8from
paulbalandan:generator-fixes

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
make:cell asked the CodeIgniter namespace confirmation twice, once for the class and once for the view. make:model --return entity asked it again when calling make:entity.

  • AbstractGeneratorCommand now remembers the answer for the current generateClass() and reuses it for the views generated after it. The next generateClass() asks again.
  • make:model calls make:entity with noInteractionOverride: true, so the entity only prints the warning. When the confirmation is declined, make:entity is skipped through the new protected isCodeIgniterNamespaceDeclined() hook.
  • Non-interactive runs still print the warning and proceed, now once per class.

make:scaffold is unchanged and still asks once per sub-generator. Forcing its sub-generators non-interactive would also drop their own prompts, so an invalid --restful or --return value would fail instead of prompting for a valid one.

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

@carson-codeigniter4 carson-codeigniter4 Bot added 4.8 PRs that target the `4.8` branch. bug Verified issues on the current code behavior or pull requests that will fix them labels Oct 12, 2026
@paulbalandan
paulbalandan merged commit b18f4b7 into codeigniter4:4.8 Oct 13, 2026
62 checks passed
@paulbalandan
paulbalandan deleted the generator-fixes branch October 13, 2026 05:38
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. bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants