Skip to content

Releases

v12.0.6

Choose a tag to compare

@nWidart nWidart released this 22 Nov 13:05
v12.0.6
db2d7da

Upgrade notes

Security release for Laravel 12. v12.0.5 and earlier are affected: update with composer update nwidart/laravel-modules. Most apps need no other change.

Show upgrade notes

Behaviour changes

  • module:install exits 1 when an install fails and skips module:update for that module. It exited 0 before. With modules.json, the remaining entries still install. (#2280)
  • module:install rejects an empty version, a version that starts with -, and a --type that resolves to no repository URL. (#2280)

Extending the package

  • Installer::getProcess() and FileRepository::install() can throw InvalidArgumentException for those inputs. (#2280)
  • getCommandLine() on a git install process shows a placeholder template. The values are in getEnv(). (#2280)

Security

  • install: module:install no longer passes the module name, version, path or repository URL through the shell, which allowed command injection from the CLI or a committed modules.json. module:update escapes the packages it reads from a module's composer.json. Backport of #2174, released in v13.1.0 (#2280, db2d7da)

Full Changelog: v12.0.5...v12.0.6

v13.3.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 20:17
abfa48c

Features

  • stubs: Align command and job stubs with Laravel 13 (#2238) (b28dee5)
  • make: Add --json-api option to module:make-resource (#2241) (485c3e3)
  • commands: Add module:make-config and module:make-job-middleware (#2242) (63c7d24)
  • make-model: Add --attributes flag for attribute-style models (#2243) (36557a8)

Bug Fixes

  • make: Add #[UseFactory] to module models generated with --factory (#2237) (db74e5f)
  • make: Reject empty generator names and seeders named Seeder (#2246) (90db932)

Performance

  • providers: Skip module config scan on cached web requests (#2230) (82f948e)
  • repository: Read module.json once per app and cache scans in tests (#2231) (721cbb8)
  • provider: Register module schedules only when Schedule resolves (#2239) (99c3e36)

Refactor

Other

  • phpstan: Raise level to 6 and type container access (#2232) (4ecea46)

v13.2.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 18:33
5971484

Upgrade notes

Most apps on the default published config need no change. Read the items below if you use custom stubs, custom generator paths, or run module commands in scripts, CI or deploys.

Show upgrade notes

Action may be required

  • Custom stubs.path needs 'stubs' => ['enabled' => true]. Without it the path is ignored (#2198)
  • Custom paths.generator.<key> without namespace (actions, casts, enums, exceptions, helpers, interfaces, repository, services, traits) now derives the namespace from path. Add namespace to keep the old one (#2207)
  • module:make rejects generator paths outside paths.app_folder, and with app_folder => '' paths that do not match their StudlyCase namespace (Providers, not app/Providers). It exits 1 and lists the bad keys (#2209, #2225)
  • generate => false also skips the stub files the key owns. 'assets' => false no longer writes vite.config.js and package.json. Set the key to true to get them back (#2223)
  • Published route-provider.stub / scaffold/provider.stub: old copies keep working as before. To get the new behaviour (routes dropped when not in stubs.files or routes.generate is false; provider list follows generated providers), copy the %%START_WEB_ROUTES%%/%%END_WEB_ROUTES%% and %%START_API_ROUTES%%/%%END_API_ROUTES%% markers and protected array $providers = [$PROVIDERS$]; from src/Commands/stubs/ (#2216, #2180)
  • No published config/modules.php: translation auto-discovery is now off. Publish the config and set 'auto-discover' => ['translations' => true] if you relied on it (#2184)
  • module:publish-translation writes to lang/modules/{module}. Move old copies from resources/lang/{module}. While resources/lang exists, lang_path() points to it and lang/ stops loading. Modules generated with v11 stubs: use lang_path('modules/...') instead of resource_path('lang/modules/...') (#2185)
  • Module config files other than config.php publish to config/<module>/<file>.php. Move files published earlier (#2186)
  • modules_statuses.json must be a JSON object (module name to true/false). A corrupt file or a bad modules.activator config now throws (#2205)

Behaviour changes

  • Scripts, CI and deploys: a module command with no module and no --all in non-interactive mode prints No module given. Pass a module name or --all. and exits 1 (it did nothing and exited 0). Add --all or module names (#2212)
  • --all now runs non-interactively (-n, CI, scheduler): module:delete --all --force -n deletes every module (#2187)
  • More failures exit 1: failing seeders and nested calls, module:lang with missing translations, module:make-middleware and module:make-observer when the file exists (#2212, #2215, #2210)
  • module:make requires name when non-interactive (#2210)
  • module:migrate --subpath is now honoured. module:migrate-fresh --pretend is refused (#2212)
  • module:publish-translation and module:publish-migration skip existing files. Pass --force to overwrite (#2199)
  • Scheduled module:prune now deletes records (it found no models before) (#2197)
  • Reset and refresh also roll back loadMigrationsFrom() paths, so those tables are dropped too (#2226)
  • Rollback and reset run down() on the migration's connection ($connection, else --database). Check secondary databases (#2179)
  • Module listeners registered by hand and found by event discovery run twice. Remove one registration and re-run event:cache (#2219)
  • aliases in module.json are now registered. Check for clashes (#2206)

Extending the package

  • Installer and Publisher properties are nullable (redeclare them as nullable); Publisher defaults to $force = false (#2181, #2211, #2199)
  • BaseCommand subclasses overriding initialize() must call parent::initialize() (#2187)
  • GeneratorCommand adds a force option: remove your own (#2210)
  • MigrateCommand has no constructor, $migrator or $migration_list (#2226)

Deprecated (removed in v14)

Module::boot(), register(), registerTranslation(), isLoadFilesOnBoot(); FileRepository::boot() and register() (and on RepositoryInterface); ModuleEvent::BOOT and REGISTER; Traits\MigrationLoaderTrait; config keys modules.register.translations and modules.register.files; ContractsServiceProvider (#2204, #2196)

Features

  • vite: Add moduleRefreshPaths() for hot reload of module views (#2217) (fed50b9)

Bug Fixes

  • make: Look up created module by studly name when firing events (d175b6a)
  • migrations: Run rollback and reset down() on the selected connection (#2179) (17eca88)
  • make: Only list generated route/event providers in module $providers (#2180) (3ac69c1)
  • install: Allow module:install without version or --path (#2181) (f57a825)
  • Keep module_vite() from mutating the shared Vite instance (#2183) (2dff505)
  • Disable translation auto-discovery when modules config is not published (#2184) (2a2cb53)
  • Load translations published by module:publish-translation (#2185) (8443999)
  • Publish module config files to the path of their config key (#2186) (a97db87)
  • Resolve --all without interaction and honour --direction (#2187) (8613953)
  • publish: Fail with ModuleNotFoundException for unknown module in module:publish-config (#2195) (22c3f37)
  • Register the module repository as a single shared instance (#2196) (478968a)
  • prune: Discover module models and skip missing models directories (#2197) (b8e7743)
  • Use package stubs unless stubs.enabled is true (#2198) (deedc70)
  • publish: Keep published translations and migrations unless --force is given (#2199) (c96304f)
  • Remove the app folder as a path prefix instead of with ltrim() (#2200) ([a6b3ba6](https://github.com/nWidart/laravel-modules/comm...
Read more

v13.1.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 07:28
3635762

Security

  • install: module:install no longer passes the module name, version, path or repository URL through the shell, which allowed command injection from the CLI or a committed modules.json. A failed install now exits with an error instead of running module:update (#2174, 25c4847)

Features

Bug Fixes

  • migrations: module:migrate-fresh asks for confirmation in production before wiping the database (#2173, 9c27d35)
  • migrations: module:migrate <Module> no longer runs the app's migrations or those of another module with a similar name (#2171, 4917d29)
  • migrations: Honour --pretend on module:migrate-rollback and module:migrate-reset, and ask for confirmation before a rollback in production (#2175, d7bab5e)
  • translations: Fix module translation loading missing its namespace, by @joaopluis (#2154, aed5d54)

Maintenance

  • ci: Add the release workflows and a Conventional Commits check on pull requests (#2176, 99c5d08)
  • ci: Modernize the CI workflow, stop duplicate runs, and remove the Travis CI and Scrutinizer config (6f30986, 65444f8)
  • tests: Bump phpunit in the Recipe test fixture to a patched version (#2172, cab48f1)
  • docs: Add AGENTS.md agent guidance and fix FUNDING.yml so both sponsor accounts show (fe7e532, 178ca04)

v13.0.0

Choose a tag to compare

@dcblogdev dcblogdev released this 19 Mar 19:18
6aa5461

What's Changed

New Contributors

Full Changelog: v12.0.5...v13.0.0

v12.0.5

Choose a tag to compare

@dcblogdev dcblogdev released this 19 Mar 18:37
5fe38e8

What's Changed

  • Replace Hardcoded Paths with Configurable Values in UpdatePhpunitCoverage Command by @cndrsdrmn in #2108
  • [fix] fix return type of method by @alissn in #2101
  • Add PLURAL_UPPER_NAME to Module Creation Replacement Variables by @alissn in #2102
  • Fix publishing config files for modules with multi-word names by @alissn in #2100
  • Test against php 8.5 by @sergiy-petrov in #2121
  • fix: correct Module parameter type in ActivatorInterface by @alissn in #2125
  • Rename 'Disabling module' to 'Enabling module' in EnableCommand by @itshichabk in #2135
  • fix(generator): resolve model namespace without app/ prefix in module observer stub by @malayvuong in #2112
  • refactor: introduce ModuleServiceProvider base class to reduce boilerplate by @dominosaurs in #2115
  • fix: resolve module helper dependency issues during service provider registration by @tareq-alqadi in #2118
  • Add support for class-based replacements instead of closures by @alissn in #2119
  • set default value for migration table configuration key by @dcblogdev in #2143
  • use config instead of env for Vapor maintenance mode check by @dcblogdev in #2144
  • Inertia support by @dcblogdev in #2145

New Contributors

Full Changelog: v12.0.4...v12.0.5

v12.0.4

Choose a tag to compare

@dcblogdev dcblogdev released this 29 Jun 09:33

What's Changed

New Contributors

Full Changelog: v12.0.3...v12.0.4

v12.0.3

Choose a tag to compare

@dcblogdev dcblogdev released this 28 Apr 07:59
ffad5c7

What's Changed

Full Changelog: v12.0.2...v12.0.3

v12.0.2

Choose a tag to compare

@dcblogdev dcblogdev released this 28 Apr 01:14

What's Changed

Full Changelog: v12.0.1...v12.0.2

v12.0.1

Choose a tag to compare

@dcblogdev dcblogdev released this 08 Mar 02:15
e56a298

What's Changed

New Contributors

Full Changelog: v12.0.0...v12.0.1