diff --git a/en/02_Developer_Guides/05_Extending/00_Modules.md b/en/02_Developer_Guides/05_Extending/00_Modules.md index 5cc1f66ff..1014e20c3 100644 --- a/en/02_Developer_Guides/05_Extending/00_Modules.md +++ b/en/02_Developer_Guides/05_Extending/00_Modules.md @@ -11,8 +11,11 @@ framework. A module is a collection of classes, templates, and other resources that is loaded into a directory. Modules are [Composer packages](https://getcomposer.org/), and are placed in the `vendor/` folder. -These packages need to contain either a toplevel `_config` directory or `_config.php` file, -as well as a special `type` in their `composer.json` file ([example](https://github.com/silverstripe/silverstripe-module/blob/5/composer.json)). +These packages need to contain one of the following in its root directory to be recognised as a module by Silverstripe CMS: + +- a `_config` directory +- a `_config.php` file +- a `composer.json` file with a `type` of either `silverstripe-vendormodule` or `silverstripe-theme`([example](https://github.com/silverstripe/silverstripe-module/blob/5/composer.json)). Like with any Composer package, we recommend declaring your PHP classes through [PSR-4 autoloading](https://getcomposer.org/doc/01-basic-usage.md#autoloading). diff --git a/en/08_Changelogs/6.0.0.md b/en/08_Changelogs/6.0.0.md index 2247e952c..c39cd50de 100644 --- a/en/08_Changelogs/6.0.0.md +++ b/en/08_Changelogs/6.0.0.md @@ -34,6 +34,7 @@ CanonicalURLMiddleware::singleton()->setEnabledEnvs([ ### Other new features - Native indexed PHP arrays can now be passed into templates and iterated over with `<% loop $MyArray %>`. Under the hood they are wrapped in [`ArrayList`](api:SilverStripe\View\ViewableData), so you can get the count using `$Count` and use `<% if $ArrayList %>` as a shortcut for `<% if $ArrayList.Count %>`. Other functionality from `ArrayList` such as filtering and sorting cannot be used on arrays since they don't have keys to filter or sort against. +- Modules no longer need to have a root level `_config.php` or `_config` directory to be recognised as a Silverstripe CMS module. They will now be recognised as a module if they have a `composer.json` file with a `type` of `silverstripe-vendormodule` or `silverstripe-theme`. ## Bug fixes