Skip to content

Version 3.16 breaks xml reports #4252

@ndench

Description

@ndench

Running Psalm at v3.16 with the following command produces an xml error:

"vendor/bin/psalm" --config="build/phpqa.xml" --show-info=true --use-ini-defaults --report="build/psalm.xml" --find-dead-code
Uncaught Exception: [Array2XML] Illegal character in tag name. tag:  in /srv/www/app/current/vendor/openlss/lib-array2xml/LSS/Array2XML.php:154                                                                                                                                            
Stack trace:                                                                                                                                                                                                                                                                               
#0 /srv/www/app/current/vendor/openlss/lib-array2xml/LSS/Array2XML.php(161): LSS\Array2XML::convert('item', Array)                                                                                                                                                                         
#1 /srv/www/app/current/vendor/openlss/lib-array2xml/LSS/Array2XML.php(87): LSS\Array2XML::convert('report', Array)                                                                                                                                                                        
#2 /srv/www/app/current/vendor/vimeo/psalm/src/Psalm/Report/XmlReport.php(23): LSS\Array2XML::createXML('report', Array)                                                                                                                                                                   
#3 /srv/www/app/current/vendor/vimeo/psalm/src/Psalm/IssueBuffer.php(748): Psalm\Report\XmlReport->create()                                                                                                                                                                                
#4 /srv/www/app/current/vendor/vimeo/psalm/src/Psalm/IssueBuffer.php(565): Psalm\IssueBuffer::getOutput(Array, Object(Psalm\Report\ReportOptions), Array)                                                                                                                                  
#5 /srv/www/app/current/vendor/vimeo/psalm/src/psalm.php(816): Psalm\IssueBuffer::finish(Object(Psalm\Internal\Analyzer\ProjectAnalyzer), true, 1601253982.4063, false, Array)                                                                                                             
#6 /srv/www/app/current/vendor/vimeo/psalm/psalm(2): require_once('/srv/www/app/cu...')                                                                                                                                                                                                    
#7 {main}                                                                                                                                                                                                                                                                                  
(Psalm 3.16@d03e5ef057d6adc656c0ff7e166c50b73b4f48f3 crashed due to an uncaught Throwable)  

Downgrading to v3.15 allows psalm to run successfully without a problem. I'm unsure how to debug this much further, happy to provide more information if required though.

PHP: 7.4.9
Ubuntu: 16.04
Symfony: 4.4.14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions