File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -517,7 +517,12 @@ The ``composer.json`` file should include at least the following metadata:
517
517
518
518
``autoload ``
519
519
This information is used by Symfony to load the classes of the bundle. It's
520
- recommended to use the `PSR-4 `_ autoload standard.
520
+ recommended to use the `PSR-4 `_ autoload standard: use the namespace as key,
521
+ and the location of the bundle's main class (relative to ``composer.json ``)
522
+ as value. For example, if the main class is located in the bundle root
523
+ directory: ``"autoload": { "psr-4": { "SomeVendor\\BlogBundle\\": "" } } ``.
524
+ If the main class is located in the ``src/ `` directory of the bundle:
525
+ ``"autoload": { "psr-4": { "SomeVendor\\BlogBundle\\": "src/" } } ``.
521
526
522
527
In order to make it easier for developers to find your bundle, register it on
523
528
`Packagist `_, the official repository for Composer packages.
You can’t perform that action at this time.
0 commit comments