rad-edition icon indicating copy to clipboard operation
rad-edition copied to clipboard

[WIP] composer "extra config package" based bundle registration

Open docteurklein opened this issue 12 years ago • 2 comments

Every library package that has configured the specified key in its extra config will be registered automatically:


{
    "name": "vendor/foo-bundle",
    "extra": {
        "register-bundles": ["Vendor\Bundle\VendorFooBundle"]
    }
}

The effect is to create a file at path app/bundle/vendor/foo-bundle that contains php code to instanciate the bundle:


<?php return new \Vendor\Bundle\VendorFooBundle($this);

The bundle always receive the kernel as first and only constructor argument.

A Kernel impl. may then be able to auto-discover and require these files to append them to its list of registered bundles.

docteurklein avatar Oct 21 '13 15:10 docteurklein

rel symfony/symfony#9341

docteurklein avatar Oct 21 '13 16:10 docteurklein

ongoing discussion about improving symfonly installation on symfony-standard. one of the approaches mentioned is close to the one proposed in this PR.

https://github.com/symfony/symfony-standard/issues/639

ghost avatar Aug 09 '14 08:08 ghost