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

Parsing of concatenated constants in classes fails #313

Closed
davidsneighbour opened this issue Nov 12, 2017 · 1 comment · Fixed by #358
Closed

Parsing of concatenated constants in classes fails #313

davidsneighbour opened this issue Nov 12, 2017 · 1 comment · Fixed by #358
Assignees
Labels

Comments

@davidsneighbour
Copy link

Error Message:

(Unexpected expression type 'PhpParser\Node\Expr\BinaryOp\Concat' for value in line x of file 'y' [UnitCollectingVisitor.php:460])

Parsed line:

const FIELDS = 'userid,accountingid,title,modified,GivenName,FamilyName,' . 'DateOfBirth,Nationality,PassportNumber,ExpiryOfPassport,' . 'ExpiryOfEntrystamp,Gender,PlaceOfIssue,PlaceOfBirth,' . 'CityOfResidence,CountryOfResidence,LastEmbarkation,' . 'DateOfLastEntry,CurrentVisaNo,VisaType,VisaValidUntil,' . 'AddressInThailand,Occupation,MobilePhone,Email,ContactName,' . 'ContactTelephone,ContactEmail,ContactRelationship,BloodType,' . 'Allergies,PreviousSurgeries,PermanentSicknesses,MedicineTaken,' . 'FurtherNotes,healthinsurance,Comment,is_customer,is_vendor,' . 'is_button,is_active,is_deleted';

the classname::FIELDS is working as expected and PHP does not complain about the concatenation. Is this a bug in phpdox or a "philosophic collision"?

@theseer
Copy link
Owner

theseer commented Nov 12, 2017

I yet have to determine what the correct behavior would be but the fact it is crashing is certainly a bug :)

@theseer theseer added the Bug label Nov 12, 2017
@theseer theseer self-assigned this Nov 12, 2017
@theseer theseer closed this as completed in 403ca2f Jan 7, 2018
MacFJA added a commit to MacFJA/phpdox that referenced this issue Apr 27, 2019
 - Refactoring of types handling
 - Fix issue with last char removed on expression (theseer#313)

Fix theseer#313, Fix theseer#233
theseer pushed a commit that referenced this issue May 10, 2019
 - Refactoring of types handling
 - Fix issue with last char removed on expression (#313)

Fix #313, Fix #233
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants