[FrameworkBundle] add forward compatibility layer when using FrameworkBundle in version 3.4 with DependencyInjection component in version 4.0
This commit is contained in:
parent
27852a05c2
commit
9f14d06c11
@ -231,8 +231,11 @@ class JsonDescriptor extends Descriptor
|
|||||||
'autoconfigure' => $definition->isAutoconfigured(),
|
'autoconfigure' => $definition->isAutoconfigured(),
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($definition->getAutowiringTypes(false) as $autowiringType) {
|
// forward compatibility with DependencyInjection component in version 4.0
|
||||||
$data['autowiring_types'][] = $autowiringType;
|
if (method_exists($definition, 'getAutowiringTypes')) {
|
||||||
|
foreach ($definition->getAutowiringTypes(false) as $autowiringType) {
|
||||||
|
$data['autowiring_types'][] = $autowiringType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($showArguments) {
|
if ($showArguments) {
|
||||||
|
@ -191,8 +191,11 @@ class MarkdownDescriptor extends Descriptor
|
|||||||
."\n".'- Autoconfigured: '.($definition->isAutoconfigured() ? 'yes' : 'no')
|
."\n".'- Autoconfigured: '.($definition->isAutoconfigured() ? 'yes' : 'no')
|
||||||
;
|
;
|
||||||
|
|
||||||
foreach ($definition->getAutowiringTypes(false) as $autowiringType) {
|
// forward compatibility with DependencyInjection component in version 4.0
|
||||||
$output .= "\n".'- Autowiring Type: `'.$autowiringType.'`';
|
if (method_exists($definition, 'getAutowiringTypes')) {
|
||||||
|
foreach ($definition->getAutowiringTypes(false) as $autowiringType) {
|
||||||
|
$output .= "\n".'- Autowiring Type: `'.$autowiringType.'`';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($options['show_arguments']) && $options['show_arguments']) {
|
if (isset($options['show_arguments']) && $options['show_arguments']) {
|
||||||
|
@ -309,7 +309,8 @@ class TextDescriptor extends Descriptor
|
|||||||
$tableRows[] = array('Autowired', $definition->isAutowired() ? 'yes' : 'no');
|
$tableRows[] = array('Autowired', $definition->isAutowired() ? 'yes' : 'no');
|
||||||
$tableRows[] = array('Autoconfigured', $definition->isAutoconfigured() ? 'yes' : 'no');
|
$tableRows[] = array('Autoconfigured', $definition->isAutoconfigured() ? 'yes' : 'no');
|
||||||
|
|
||||||
if ($autowiringTypes = $definition->getAutowiringTypes(false)) {
|
// forward compatibility with DependencyInjection component in version 4.0
|
||||||
|
if (method_exists($definition, 'getAutowiringTypes') && $autowiringTypes = $definition->getAutowiringTypes(false)) {
|
||||||
$tableRows[] = array('Autowiring Types', implode(', ', $autowiringTypes));
|
$tableRows[] = array('Autowiring Types', implode(', ', $autowiringTypes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user