All Notable changes to laravel-modules
will be documented in this file.
php artsian module:enable
will enable all modulesphp artsian module:disable
will disable
- Laravel 7.0 support
- Properly guessing the namespace from the path (in
GeneratorPath
class) - Fixing generation of resource file if the resource has been disabled to generate
- Fix when using a custom service provider namespace, namespace is correctly referenced in module.json and compose.json
- Fix when using custom service provider namespace, module path is correctly referenced in the
RouteServiceProvider
andModuleServiceProvider
- Fix when using a custom path for controllers in the controller stub
- Added new
module:delete
command
- Add optional path parameter to
module_path
helper (PR#861) - The default path of the
module_statuses.json
file has been moved to the Application's base path. This is to improve its visibility and the fact that it can be committed by default. - Throw an exception when no proper activator class was configured
-
New File Activator feature. PR #790 from @ryssbowh
This feature changes how modules are activated and de-activated. Currently module statuses are stored on disk, this features adds the possibility of storing this status information in a database.
Use the command
php artisan module:v6:migrate
to have old modules active status migrated to the new system.
-
Alternate way to define the namespace of modules in PR #776 by @daison12006013
This allows to have the content of the module under an
src/
folder for example. -
BREAKING New way to handle active and inactive modules.
Modules don't store their active status in their module.json file anymore, but in a file under the storage folder. Run
php artisan module:v6:migrate
to use the new system. -
BREAKING Renamed method
enabled
toisEnabled
in\Nwidart\Modules\Module
. -
BREAKING Renamed method
disabled
toisDisabled
in\Nwidart\Modules\Module
. -
BREAKING Renamed method
enabled
toisEnabled
in\Nwidart\Modules\FileRepository
. -
BREAKING Renamed method
disabled
toisDisabled
in\Nwidart\Modules\FileRepository
. -
BREAKING Removed the
__get
magic method on the\Nwidart\Modules\Module
class. Useget()
orjson()->get()
instead. -
The
module:make-listener
command now correctly uses the namespace configuration -
The generated Factories now has type hints for the
\Illuminate\Database\Eloquent\Factory
class -
Improved foreign key constraint generation
-
Exception handling in the
SeedCommand
has been improved
artisan module:route-provider
has a--force
option to overwrite existing file
- Fixing the
RouteServiceProvider
generation to properly use theroutes/web
androutes/api
stubs - Replacing
@stop
with@endsection
in the view stub file Module
class does not extend Laravel's Service Provider class anymore
- Laravel 5.8 support
- Deprecated string and array methods have been replaced
- Fixed caching not being cleared after disabling and enabling modules
- Update Route Provider stub to not affect the root namespace of the URL generator (#727)
- PHP 7.1 support
- Updated to laravel mix 4
- Add
--api
argument tomodule:make-controller
command - Seeding modules outside out
Modules
namespace
- New way of handling routes by default using a RouteServiceProvider (instead of start.php)
- Laravel 5.7 support
- Allow class resolution on short name and abstract
module:seed
accepts a--class
option
- Added the ability to set a sub-namespace to controllers
module:make-controller Api\\TestController
module:update
command has now the possibility to update all modules at once- Fixing commented code for Laravel Mix
- Added possibility to update all modules at once if any not specified (PR #523)
- Mix: Fix css relative urls by changing the route folder (PR #521)
- Mix: Prevents every build from deleting previous Mix config file (PR #521)
- Laravel mix configuration (https://nwidart.com/laravel-modules/v3/basic-usage/compiling-assets)
- Allow symlinks in module path
- Returns the parameter
--class
to theSeedCommand
. - Generate folders recursively
- Removing link that has become a 404
- Fixed seed command exception typehint
- Removed the optimize command on the
module:make-migration
command
- Update publish commands to use the new API to get all enabled modules (PR #483 )
- Added support for laravel 5.6
- Using phpunit 7
- BC:
Repository
class: renamedenabled
toallEnabled
- BC:
Repository
class: renameddisabled
toallDisabled
- BC:
Repository
class: renamedactive
toenabled
- BC:
Repository
class: renamednotActive
todisabled
- Dropped php 7.0 support
- BC:
Module
class: Deprecatedactive()
method, useenabled()
- BC:
Module
class: DeprecatednotActive()
method, usedisabled()
- BC:
Repository
class: DeprecatedaddPath()
method, useaddLocation()
- BC:
Repository
class: Deprecatedget()
method, usefind()
- BC:
Repository
class: DeprecatedgetUsed()
method, usegetUsedNow()
- Rename the
before
method toboot
in theRouterServiceProvider
stub file - Fixing caching issue if modules were loaded from a different directory
- Fixing how modules are loaded from vendor directory (#423 #417)
- Update to Mockery 1.0
- use default file stubs only if override does not exists
- Fix non well formed numeric value in seed command
- Ability to customise the destination folder & namespace of a generated class
- Added
php artisan module:migrate-status
command config_path()
helper for Lumen- Added views tag to view config in ServiceProvider
- added package auto discovery for laravel 5.5 in generated module
composer.json
- Adding the ability to correctly load modules from multiple locations, together
- Custom seeder path now also used in the
module:seed
command
- added config_path helper to helpers for Lumen support
- updated readme on how to install laravel-modules in Lumen
- Making the path to migrations for
loadMigrationsFrom()
call dynamic based of configuration - Making the factory path dynamic for master service provider & make-factory command
- Make the route file location dynamic in start.php based of
stubs.files.routes
- Making the route path dynamic on the route service provider based of
stubs.files.routes
- New structure in configuration to set which folders will be generated on
module:make
(old format still supported) - Setting new sensible defaults to what folders to generate by default.
- Change the assets directory default location
resources/assets
- Setting a default value for
modules.paths.modules
configuration key
- New
module:make-resource
command to generate resource classes - New
module:make-test
command to generate test classes
- Improved error output of the
module:seed
command - Marking methods that served as proxies in
Module
andRepository
classes as deprecated for next major - Fixed
module:make
andmodule:make-provider
to generate the correct master service provider - Tests: tests are now using
spatie/phpunit-snapshot-assertions
to make sure the generated files have the correct content - Adding a sync option to the
module:make-job
command to make a synchronous job class - Changed
module:make-event
command to allow duck typed events (not type hinted event class) - Changed
module:make-listener
to allow a--queued
option to make the event queueable - Changed
module:make-listener
command to not use the full class typehint when class was previous imported
- Ability to ignore some folders to generate
- Creating an module:unuse command to forget the previously saved module
- New command to generate Policy classes
- New command for creating factories
- New command for creating rules
- new
public_path
helper for Lumen
- Refactored class names that generate something to be fully consistent
- Fixed class namespace to
Repository
inContractsServiceProvider
- Lumen compatibility with new way to register providers
- Register module migrations
- Fixed issue with
module:migrate-refresh
command - Improved module loading of their service providers. Using laravel caching system. Allowing usage of deferred providers.
- Fixed path to module factories
- Support Laravel 5.5
- Allow migrate-refresh command to be run without module argument
- Module name was added to the module enable and disable events
- Only run composer require on the module:update command if there's something to require
- Fixing lumen support
- Laravel Lumen support
- Update dev dependencies grumphp and phpcsfixer to latest versions
- The
make:model
command with the-m
flag to create the associated migration is now using a current migration file name
- Throw an exception if asset name structure was not correct when using
{!! Module::asset() !!}
- Create the module used file if non existent. Will provide for a better error message if module is omitted in console commands without a module:use.
- More flexibility to the
json()
method, while keeping the performance improvements.
- Improving performance by only instantiating Json class for the module.json file once
- Added support for generic git hosts
- Using
resource_path
to register module views - Changed the method to load additional eloquent factory paths
- A
--migration
flag to themodule:make-model
command to generate the migration file with a model - Factories are now also defined in the master service providers. This is used in the
module:make
command without the--plain
flag, or usingmodule:make-provider
with the--master
flag. module_path()
helper function.
- The default location of event listeners is now in
Listeners/
, fromEvents/Handlers
- Fixed the
--plain
on themake:module
command, to not include a service provider in themodule.json
file as it's not generated. - Add command description to the
GenerateNotificationCommand
.
- Added the
Macroable
trait to theModule
class.
- The
collections
method now accepts an optional parameter to get modules by status, in a laravel collection. - Allow laravel
5.5.*
to be used.
module:update
: Copy over the scripts key to main composer.json file- Add a
--subpath
option to migrate command module:update
: Install / require all require & require-dev package at once, instead of multiple calls to composer require.module:publish-config
command now uses the namespace set up in the configuration file.
module:update
command now also takes therequire-dev
key into account- Making the
$migrations
parameter optional ongetLastBatchNumber()
- The module list command (
module:list
) now returns the native module name
- Fixed issues with route file location in
start.php
- Add checking for failure to parse module JSON
- Support for Laravel 5.4
- Adding show method on resource controller
- Added check for cached routes to not load them multiple times
- Module requirements (PR #117)
- Added
Macroable
trait toModule
class (PR #116)
- Added missing import of the
Schema
facade on migration stubs - A default plain migration will be used if the name was not matched against a predefined structure (create, add, delete and drop)
- Add tests for all the different migration structures above
- Fix: respecting order in reverse migrations (PR #98)
- Fix:
module:reset
andmodule:migrate-rollback
didn't have--database
option (PR #88) - Fix:
Module::asset()
, removed obsolete backslash. (PR #91)
module:make-notification
command to generate a notification class
- Usage of the
lists()
method on the laravel collection has been removed in favor ofpluck()
- Modules can now overwrite the default migration and seed paths in the
module.json
file
- Generated emails are now generated in the
Emails
folder by default
- Ability to set default value on the config() method of a module.
- Mail: Setting default value to config. Using that as the namespace.
- Using PSR2 for generated stubs
- Generation of Mailable classes
- Using stable version of laravelcollective/html (5.3)
- Using stable development of laravelcollective/html
- Adding
module:make-job
command to generate a job class - Adding support for Laravel 5.3
- Added force option to module:seed command
- Experimental Laravel 5.3 support
- Make sure the class name has
Controller
appended to it as well. Previously only the file had it suffixed.
- Dependencies:
pingpong/support
andpingpong/generators
- Adding a plain option to the generate controller command
- Generate controller command now generates all resource methods
- Module generation namespace now works with
StudlyCase
(Issue #14) - No module namespace fix (#13)
- Using new service provider stub for module generation too
Initial release