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

@return string[] misinterpreted as array<mixed,string> #1507

Closed
evought opened this issue Dec 27, 2014 · 5 comments
Closed

@return string[] misinterpreted as array<mixed,string> #1507

evought opened this issue Dec 27, 2014 · 5 comments

Comments

@evought
Copy link

evought commented Dec 27, 2014

The following docblock in an interface:

/**
 * Returns the list of fields specified for this property.
 * 
 * @return string[]
 */
public function getAllowedFields();

does not generate the correct documentation for the type in 2.8.1. It comes out as:

getAllowedFields() : array<mixed,string>
@mvriel
Copy link
Member

mvriel commented Feb 18, 2015

string[] and array<mixed,string> were equal in the most recent PSR-5 draft. Due to some discussions that are going on the latter syntax is no longer preferable in PSR-5 and will be replaced.

So: technically there is not an error but we have been too fast with adopting features of PSR-5 that were still in draft.

We should change the output to show a more accurate representation

@mvriel mvriel added the bug label Feb 18, 2015
@jaapio
Copy link
Member

jaapio commented Dec 25, 2017

behavior has been changed in v3.0.0-alpha.

@jaapio jaapio closed this as completed Dec 25, 2017
@jaapio jaapio added this to Done in Implement v3 parser Dec 26, 2017
@janareddymareddy
Copy link

Hi jaapio can you please mention what the changes need to be done in 2.9.1 for this. we tried with V3.0.0 but this version not working fine with my project

@jaapio
Copy link
Member

jaapio commented Aug 8, 2021

I think this was the commit: 63ab301#diff-eec714414aff322d1b44f77a162c5287fe510df4cf148e70d8367e56a02383b1

But as I told you before, please let us know what the issue with v3 is, because we cannot give active support for v2.

@janareddymareddy
Copy link

Jaapio,

i have attached the XML output on #2965

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

4 participants