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:factory
to properly createuse
statement when using default model location - Fixed issue when executing
craft:seed
with factory flag--factory
to properly use--model
value internally - Refactored
craft:migration
to build className from migration name - Added
--update
flag to force creating update migration (usesSchema::table
instead ofSchema::create
) - Fixed
helpers.php
to work correctly with PHP 7.4 Issue 12
> laravel-craftsman craft:factory TestFactory -m Test
- Refactored
craft:migration
when using--foreign
flag 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 --pest
option 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
getNamespace
method toCraftsmanFileSytem.php
- Added
--invokable
option tocraft:controller
- Added
craft:rule
command - Added
craft:provider
command - Refactored tests to check for custom template path for each command
- Refactored
craft:model
command to use --controller|-c instead of --collection|-c - Refactored all
Commands/Craft*.php
to supportgetNamespace
method - Refactored all
Commands/Craft*.php
to include new--debug
option - Refactored
app/Exception/Handler
to fixedUndefined Offset
- Added test to support
--controller
in CraftModelTest - Added more tests to
CraftListenerTest
- Added more tests to
CraftEveTest
- Fixed
craft:command
template 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:command
command - Added
craft:event
andcraft:listener
commands
- Added support for crafting migrations based on
--foreign
short formatlaravel-craftsman craft:migration create_members_table --foreign=member_id
will populateftable
andfkey
$table->foreign('member_id')->references('id')->on('members');
- Added support for overriding defaults using published configuration file
laravel-craftsman publish
- Added
craft:api
command - Code cleanup (based on phpinsights analysis)
- Fixed
craft:controller
to craft new controller inApp/Http/Controllers
directory when usingresource
flag - Fixed test case to
CraftControllerTest::should_create_resource_controller
to cover correct resource creation related toresource
flag (see above)
- Modified
craft:controller
shortcut forresource
controller from-u
to-r
- Modified npm tasks for running test, adding
test:all
task - Modified
task:stress
to callstress-test.sh
task so it will properly handle stress retries
craft
command alias forinteractive
$ laravel-craftsman craft
- feature: add
foreign
constraint support when crafting migrations - feature: add
current
option when crafting migrations - feature: add
migration
option when crafting models - admin: updated tests
- admin: updated readme
- Added new
craft:migration
options to interactive interface - Updated tests to support new
craft:migration
andcraft:model
features
- Added artisan fallback when executing commands which dont exist in
craftsman
o For example, calllaravel-craftsman craft:observer TestObserver
the artiasn commandmake:observer
will be executed
- Added
craft:publish
command 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:resource
command - Extended
craft:controller
command
- 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
resource
controller - Added
craft:resource
- Added
resource
tests
- 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
template
option 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