Skip to content
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

Improve docblock to pick up namespace in Parser as well as class, or at least add it to the docs. #8

Closed
weierophinney opened this issue Dec 31, 2019 · 1 comment
Labels
Bug Something isn't working

Comments

@weierophinney
Copy link
Member

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.


Originally posted by @NoMan2000 at zendframework/zend-soap#51

@weierophinney
Copy link
Member Author

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee.
If you have a security issue, please follow our security reporting guidelines.
If you wish to take on the role of maintainer, please nominate yourself

If you need an actively developed SOAP client, we recommend phpro/soap-client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant