Skip to content

Commit

Permalink
Merge pull request #260 from pink6440/patch-1
Browse files Browse the repository at this point in the history
Update MetadataConverter.php
  • Loading branch information
GuilhemN authored Sep 18, 2016
2 parents a3fb261 + 49fcccf commit 53d0a97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Metadata/MetadataConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ public function convert(ClassHierarchyMetadata $metadata)
$definition->setArguments($classMetadata->arguments);
}
if (null !== $classMetadata->autowire) {
if (!method_exists($definition, 'setAutowire')) {
if (!method_exists($definition, 'setAutowired')) {
throw new InvalidAnnotationException(sprintf('You must use symfony 2.8 or higher to use autowiring on the class %s.', $classMetadata->name));
}

$definition->setAutowire($classMetadata->autowire);
$definition->setAutowired($classMetadata->autowire);
}
if (null !== $classMetadata->autowiringTypes && method_exists($definition, 'setAutowiringTypes')) {
$definition->setAutowiringTypes($classMetadata->autowiringTypes);
Expand Down

0 comments on commit 53d0a97

Please sign in to comment.