This repository was archived by the owner on Jan 31, 2020. It is now read-only.
This repository was archived by the owner on Jan 31, 2020. It is now read-only.
Improve docblock to pick up namespace in Parser as well as class, or at least add it to the docs. #51
Open
Description
The docs do not contain any warnings about this problem, which makes it annoying to debug. The error occurs when using anything in a namespace. PHPs typical way of dealing with this is to add the (overused) use
statement to the top with the namespace and the class.
However, Zend\Soap\AutoDiscover
does not pick up that use statement and instead only uses the classname.
<?php
use myNameSpace\MyClass;
class Foo
{
/**
* @var MyClass
*/
public $customer;
}
That fails. When Zend parses it, it will not parse the namespace, just the classname "MyClass", and then fail.
For it to work, it must be done like this:
<?php
class Foo
{
/**
* The backspace qualifier is only necessary if this is namespaced.
* @var \myNameSpace\MyClass
*/
public $customer;
}
A code fix is probably above and beyond, but some docs highlighting that problem would help.