Open
Description
Description
The Main Idea
Improve the CakePHP Bake console tool by implementing a system for displaying configurable pre-bake and post-bake messages, banners, and admonishments. This would allow teams to display important information, coding standards, next steps, or warnings before and after code generation tasks are executed.
Potential Roadblocks
- Ensuring messages work across different terminal environments/shells
- Avoiding disruption to existing Bake command workflows
- Supporting both project-level and global message configurations
- Managing the display of messages in CI/CD environments vs interactive usage
User Feedback/Frustration
- In an app of any complexity (especially one with custom templates) few to zero baked files are immediately ready-to-go: they ALL require customization
- New team members miss important project conventions after generating code
- Teams lack a standardized way to communicate important information during code scaffolding (like this file needs customizations X and Y!)
- Project-specific instructions get lost in wikis or documentation rather than appearing at the moment of code creation (like add this file to the service container!)
Potential Next Steps
- Implement hooks in the Bake command system for message display using the new Banner helper
- Support both plain text and styled/colored terminal output
- Allow message configuration at both global and command-specific levels
- Add template variables that can be interpolated into messages (e.g.,
{table}
,{plugin}
) - Create documentation with examples of common usage patterns
- Consider allowing interactive confirmations for certain messages
CakePHP Version
6