8000 handle inheritance in config:dump-reference by lsmith77 · Pull Request #5126 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

handle inheritance in config:dump-reference #5126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

lsmith77
Copy link
Contributor

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: ?
Fixes the following tickets: -
License of the code: MIT

Currently when passing in a bundle name that identifies a bundle that is a parent to another bundle, it will not return the reference for the requested bundle, but for the inheriting (even if that bundle has no configuration class).

F.e.
app/console config:dump-reference SymfonyCmfBlockBundle

will fail if there is a Bundle SandboxBlockBundle that has SymfonyCmfBlockBundle set as the parent.

$extension = $bundle->getContainerExtension();
break;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not simply the following ?

<?php
$bundles = $kernel->getBundles()
$bundle = $bundles[$name]; // checking for invalid names here is let to the reader
$extension = $bundle->getContainerExtension();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right .. i thought this way would be faster .. but since the bundles array already exists .. it was infact quite a bit slower. correct it ..

fabpot added a commit that referenced this pull request Aug 6, 2012
…#5126)

Commits
-------

cdfbe72 handle inheritance in config:dump-reference when a bundle name is passed to the command

Discussion
----------

handle inheritance in config:dump-reference

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: ?
Fixes the following tickets: -
License of the code: MIT

Currently when passing in a bundle name that identifies a bundle that is a parent to another bundle, it will not return the reference for the requested bundle, but for the inheriting (even if that bundle has no configuration class).

F.e.
app/console config:dump-reference SymfonyCmfBlockBundle

will fail if there is a Bundle SandboxBlockBundle that has SymfonyCmfBlockBundle set as the parent.
@fabpot fabpot merged commit cdfbe72 into symfony:master Aug 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0