Skip to content

Commit

Permalink
Merge pull request #538 from creative-commoners/pulls/6/manifest-comp…
Browse files Browse the repository at this point in the history
…oser

DOC Modules no longer need to have a _config.php file or _config dire…
  • Loading branch information
GuySartorelli authored Jul 1, 2024
2 parents 1ffee02 + 21fe47c commit 846e13d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit 846e13d

Please sign in to comment.