theseer / phpdox

Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT)
http://phpdox.de
Other
600 stars 121 forks source link

Parsing of concatenated constants in classes fails #313

Closed davidsneighbour closed 6 years ago

davidsneighbour commented 6 years ago

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 commented 6 years ago

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