CakePHP Bake 2.8.0 RC1
Pre-releaseWhat's Changed
Non-destructive baking for Entity and Table
The model command now supports a new --update
option which tries to update only the generated code in entity and tables files.
Updating will keep any user-specific class member functions, properties and constants while updating all generated code. However, any user-specific code within generated functions, functions and constants will be over-written.
Generating HasOne associations
HasOne associations are now detected and generated in table classes.
File header customization
The header for every generated file can now be customized by overriding the Bake.file_header
template.
Template renderer customization
All bake commands now use BakeCommand::createTemplateRenderer()
to create renderer instances. This can be overridden to customize the renderer.
If you only need to add ViewBuilder options such as custom helpers, you can handle the new Bake.renderer
event which passes the renderer instances.
Other Changes
- Update plugin class generation. by @ADmad in #814
- Don't enforce FKs presence on create to allow e.g. hasMany association save calls to run through by @LordSimal in #841
- Make bake template extension configurable by @othercorey in #861
- Add $force to CommonOptionsTrait by @othercorey in #863
- Skip prompting the user if entity or table file is unchanged by @othercorey in #860
Full Changelog: 2.7.2...2.8.0-RC1