Releases: cakephp/bake
2.8.3
What's Changed
- Fix stan errors - by @ADmad in #901
- Fix error when trying to bake with non-existent plugins directory - by @ADmad in #911
New Contributors
- @angelxmoreno made their first contribution in #876
Full Changelog: 2.8.2...2.8.3
2.8.2
What's Changed
- Update regex for finding bake template files. by @ADmad in #871
- Add support for keeping custom class implements with --update by @othercorey in #873
Full Changelog: 2.8.1...2.8.2
CakePHP Bake 2.8.1
CakePHP Bake 2.8.0
Changes
- Support for keeping app-specific functions, properties and constants in model file with the new
--update
option forbake model
- All generated code will still be overwritten
- Support for customizing file headers with the new
Bake.file_header
element - Detecting and generating
HasOne
associations - Customizing template renderer View options using the new
Bake.renderer
event orBakeCommand::createTemplateRenderer()
- Don't enforce FKs presence on create to allow e.g. hasMany association save calls to run through
- Skip prompting the user to overwrite a file if it hasn't changed
- Adding
$force
property toCommonOptionsTrait
set by the--force
option - Make
bake template
file extension configurable - Update plugin class generation
CakePHP Bake 2.8.0 RC1
What'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
CakePHP Bake 2.7.2
What's Changed
- Use generic syntax by @dereuromark in #846
- Fix wrong connection used when detecting belongsTo associations by @othercorey in #866
Full Changelog: 2.7.1...2.7.2
Bake 2.7.1
What's Changed
- Fix class not found in plugin test by @nishimura-d in #823
- Update GitHub actions by @dependabot in #824, #825 and #826
- Update phpstan and psalm by @LordSimal in #829
- Remove invalid @param by @othercorey in #832
- Avoid generating association if table object or database table exist by @ajibarra in #842
New Contributors
- @nishimura-d made their first contribution in #823
- @dependabot made their first contribution in #824
- @ajibarra made their first contribution in #842
Full Changelog: 2.7.0...2.7.1
Bake 2.7.0
What's Changed
- Fix up templates for generics in docblocks, more precise assoc def. by @dereuromark in #792
- fix multiple test run issue by @GrandFelix in #794
- Fix PHP 8.1 shell helper fatal error by @LordSimal in #799
- fix --quiet option not being quiet by @LordSimal in #800
- Add missing docblock param, add assoc doc. by @dereuromark in #802
- change validateNames logic to prevent special chars in column names by @LordSimal in #806
- omit primary key validation and re-add FK validation rules while baking the model by @LordSimal in #805
- changed method visibility for baked setUp and tearDown tests to protected by @LordSimal in #810
- fix tests not using reference to command code constant via the interface by @LordSimal in #812
- minor cleanup by @LordSimal in #813
- don't use Number helper if baked field is nullable by @LordSimal in #811
- added services method to baked plugin template by @LordSimal in #809
- 2.x search upgrade preparation by @ndm2 in #815
- 2.x - Update source files path. by @ndm2 in #817
- update to PHPStan 1.5 by @LordSimal in #818
- match middlewareQueue name by @saeideng in #819
- github action - fix branch name by @saeideng in #822
New Contributors
- @LordSimal made their first contribution in #799
Full Changelog: 2.6.1...2.7.0
Bake 2.6.1
Changes
- Fixed baking columns that start with an underscore
_
.
Bake 2.6.0
New Features
- Requires CakePHP 4.3.0+
- Update plugin creation for 4.3 by @markstory in #757
- Add
CommandHelper
bake command by @mentisy in #763 - Full french doc update by @zachee54 in #764
- Add stub for console() to bake templates by @rkaiser0324 in #769
- Add support for phpunit 9 by @othercorey in #772
- Add support for multiple field unique constraints by @othercorey in #780
- Add allowMultipleNulls to unique rules for nullable fields by @othercorey in #784
Fixes
- Fix cakephp 4.3 deprecations by @othercorey in #767
- Add php 8.1 to matrix by @othercorey in #768
- Convert query to resultset before setting view var. by @ADmad in #760
- Make field generation in fixtures optional by @markstory in #765
- Fix setting array display field by @othercorey in #766
- Disable and clear connection metadata cache before baking model by @othercorey in #771
- Exclude hidden fields from index and view template generation by @othercorey in #773
- Validate column names before baking model or fixture by @othercorey in #774
- Add decimal data type to record import test by @othercorey in #777
- Use VarExporter to generate fixture records string by @othercorey in #776
- Don't create unused temp directory by @othercorey in #778
- Simplify generating array display field by @othercorey in #781
- Set fields key for all rules that expect an array by @othercorey in #782
New Contributors
- @zachee54 made their first contribution in #764
- @rkaiser0324 made their first contribution in #769
Full Changelog: 2.5.2...2.6.0