Skip to content

Bundle extension documentation #3231

Closed
Closed
@cordoval

Description

@cordoval

On this page here
http://symfony.com/doc/current/cookbook/bundles/extension.html

i read

If you follow the naming conventions laid out above, then the load() method of your extension code is always called as long as your bundle is registered in the Kernel. In other words, even if the user does not provide any configuration (i.e. the acme_hello entry doesn't even appear), the load() method will be called and passed an empty $configs array. You can still provide some sensible defaults for your bundle if you want.

and

Additionally, the load() method of your extension will only be called if the user specifies the acme_hello alias in at least one configuration file. Once again, this is because the Extension class doesn't follow the standards set out above, so nothing happens automatically.

I might be pulling things out of context, but it is confusing to understand whether your configuration will be loaded when you don't put acme_hello in your config.

/cc @flip111

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions