zendframework / zend-servicemanager

ServiceManager component from Zend Framework
BSD 3-Clause "New" or "Revised" License
188 stars 89 forks source link

docbock fix for ServiceManager::resolveAliases(): @return, not @returns; Causes bug in zf-annotation #271

Closed SteveHatherley closed 5 years ago

SteveHatherley commented 5 years ago

Submitted is a minor typographical fix for the docblock of ServiceManager::resolveAliases() which causes an exception when using for zf-annotations (and likely other doctrine annotation powered tooling).

Fatal error: Uncaught Doctrine\Common\Annotations\AnnotationException: 
[Semantical Error] The annotation "@returns" in method Zend\ServiceManager\ServiceManager::resolveAliases() was never imported. 
Did you maybe forget to add a "use" statement for this annotation? in /var/www/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php on line 54

To reproduce:

  1. Check out zend-framework-skeleton
  2. Add zf-annotations to composer and config/application.php ( or in a module )
  3. Attempt to access any route, and see the above error

Expected Behavior: zf-annotation handles Doctrine @Route() annotations without errors

Proposed fix: