Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Modules no longer need to have a _config.php file or _config dire… #538

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions en/02_Developer_Guides/05_Extending/00_Modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
1 change: 1 addition & 0 deletions en/08_Changelogs/6.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading