-
Notifications
You must be signed in to change notification settings - Fork 27
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
Native types being assigned to current namespace #3
Comments
http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration I'm aware |
This template gets the type info from phpDocumentor. What version of phpDocumentor do you have installed? Seems like PHP 7 support was added in version 2.9 https://github.com/phpDocumentor/phpDocumentor2/releases |
Yeah, I think I had installed v2.9 beforehand, but reverted to 2.8 after seeing this message:
Is there a newer version of this package I should be using? |
Ah, sorry. I thought I had defined a version that allows minor updates. I'll fix it and make a new release. |
I released a new version that allows updating to phpdocumentor 2.9. |
Sadly, updating phpdocumentor to {
"name": "my/awesome/library",
"version": "1.0.0",
"scripts": {
"phpdoc": [
"php vendor/bin/phpdoc",
"sed -i -e 's/\\\\My\\\\Awesome\\\\Library\\\\string/string/' -e 's/\\\\My\\\\Awesome\\\\Library\\\\array/array/' phpdocs/README.md"
]
}
} $ composer run-script phpdoc
|
Ok, I set up a test of my own and I see the same result even with phpdocumentor 2.9. I'll look into it to see if I can figure out a way to fix it. Meanwhile, another workaround is to have an actual DocBlock comment that has type |
@cvuorinen Yeah, much better than a |
Seems like this should be fixed in phpDocumentor 3 but it's still WIP.
from https://github.com/phpDocumentor/phpDocumentor2/releases/tag/v3.0.0-alpha1 |
When generating documentation for a class under a namespace, certain types seem to be mapped to the namespace instead of remaining their native PHP types.
For instance,
Produces documentation looking like:
When obviously this is a native
string
identifier, and adding\string
to the function causes PHP to throw a syntax error. What I don't understand is where this template is excludingarray
, otherwise I'd just addstring
to the list of native classes to ignore!Any ideas where this can be done? It's a pretty perfect template otherwise!
The text was updated successfully, but these errors were encountered: