All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fixed issue when executing
craft:factoryto properly createusestatement when using default model location - Fixed issue when executing
craft:seedwith factory flag--factoryto properly use--modelvalue internally - Refactored
craft:migrationto build className from migration name - Added
--updateflag to force creating update migration (usesSchema::tableinstead ofSchema::create) - Fixed
helpers.phpto work correctly with PHP 7.4 Issue 12
> laravel-craftsman craft:factory TestFactory -m Test- Refactored
craft:migrationwhen using--foreignflag to place into separate schema method as migration has issues when they are together
// using --foreign shorthand only supplying foreign key, the rest will be created automatically
> laravel-craftsman craft:factory TestFactory --foreign test_id- Adjust tests to cover above changes
- Added
craft:test --pestoption to create pest formatted tests
> laravel-craftsman craft:test TestPest.php --pest
> laravel-craftsman craft:test TestPest.php --pest --unit-- Fixed craft:migration to properly use --tablename for CreateXXXTable class name
-- Fixed $tablename variable in templates/model.mustache template to use correct $table
Before:
protected $tablename = "users";After:
protected $table = "users";- Added
getNamespacemethod toCraftsmanFileSytem.php - Added
--invokableoption tocraft:controller - Added
craft:rulecommand - Added
craft:providercommand - Refactored tests to check for custom template path for each command
- Refactored
craft:modelcommand to use --controller|-c instead of --collection|-c - Refactored all
Commands/Craft*.phpto supportgetNamespacemethod - Refactored all
Commands/Craft*.phpto include new--debugoption - Refactored
app/Exception/Handlerto fixedUndefined Offset - Added test to support
--controllerin CraftModelTest - Added more tests to
CraftListenerTest - Added more tests to
CraftEveTest
- Fixed
craft:commandtemplate did not properly extend Command - Fixed issues when running on PHP 7.4
- implode parameter alignments
- Upgraded mustache package to 2.13 (issues with 2.12 and missing variables)
- Added
craft:commandcommand - Added
craft:eventandcraft:listenercommands
- Added support for crafting migrations based on
--foreignshort formatlaravel-craftsman craft:migration create_members_table --foreign=member_idwill populateftableandfkey
$table->foreign('member_id')->references('id')->on('members');- Added support for overriding defaults using published configuration file
laravel-craftsman publish
- Added
craft:apicommand - Code cleanup (based on phpinsights analysis)
- Fixed
craft:controllerto craft new controller inApp/Http/Controllersdirectory when usingresourceflag - Fixed test case to
CraftControllerTest::should_create_resource_controllerto cover correct resource creation related toresourceflag (see above)
- Modified
craft:controllershortcut forresourcecontroller from-uto-r - Modified npm tasks for running test, adding
test:alltask - Modified
task:stressto callstress-test.shtask so it will properly handle stress retries
craftcommand alias forinteractive$ laravel-craftsman craft
- feature: add
foreignconstraint support when crafting migrations - feature: add
currentoption when crafting migrations - feature: add
migrationoption when crafting models - admin: updated tests
- admin: updated readme
- Added new
craft:migrationoptions to interactive interface - Updated tests to support new
craft:migrationandcraft:modelfeatures
- Added artisan fallback when executing commands which dont exist in
craftsmano For example, calllaravel-craftsman craft:observer TestObserverthe artiasn commandmake:observerwill be executed
- Added
craft:publishcommand to publish craftsman templates to current project - Removed extraneous master templates (those ending in .php)
- Fixed rule parsing offset
- Adjust rules (form request) and fields (migration) processing
- Added
craft:resourcecommand - Extended
craft:controllercommand
- Fixed issue when creating migrations, created invalid class name (Issue 005)
- Fixed issue creating unnecessary use statement for model which is in default namespace (app directory)
- Added
resourcecontroller - Added
craft:resource - Added
resourcetests
- Fix issue when creating migrations and tablename is not supplied
- Added migration name parsing to determine migration class name when --model or --tablename not supplied
- Added more tests to cover migration adjustments
- Added new
templateoption which allows passing a one off template to be used instead of using either default templates, or user defined templates in constants.
- Added view crafting to craft:all
- Added --extends and --section options (for views)
- Added --no-views to craft:all command Note: When using craft:all, the --no-create, --no-edit, --no-index and --no-show options are not used
- Refactor tests, cleanup
- Added view creation
- Added check to error if file exists o Use --overwrite option to force creation o Refactored messages to work with file existence check
- Refactor asset creation to not automatically overwrite files
- Initial Release