Skip to content

Commit c7a94c9

Browse files
committed
Improve the documentation
1 parent 048bdc4 commit c7a94c9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,25 @@ $kernel = new Kernel([
8282

8383
all the files in `vendor/foo/bar/res/config/*.php` will be loaded.
8484

85+
**Your main application will probably contain configuration files too: it is also a module**. Since it may not have a package name in `composer.json` you will need to set one. You can name it `app`, for example:
86+
87+
```json
88+
{
89+
"name": "app",
90+
"require": {
91+
// ...
92+
}
93+
}
94+
```
95+
96+
That way you can let the kernel load your application as a module:
97+
98+
```php
99+
$kernel = new Kernel([
100+
'app',
101+
]);
102+
```
103+
85104
### Environments
86105

87106
Applications often need to behave differently according to the environment: `dev`, `prod`, etc.

0 commit comments

Comments
 (0)