rad-edition
rad-edition copied to clipboard
[WIP] composer "extra config package" based bundle registration
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.
rel symfony/symfony#9341
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