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

Possible error #368

Closed sjoller closed 4 years ago

sjoller commented 5 years ago

Trying to generate docs for my project threw this error, asking me to report it.

PHP Version: 7.2.19-1+0~20190531112637.22+stretch~1.gbp75765b (Linux)
PHPDox Version: 0.12.0-dev
Exception: TypeError (Code: 0)
Location: /mnt/c/Work/ProjectName/htdocs/vendor/theseer/phpdox/src/collector/project/SourceFile.php (Line 74)

Return value of TheSeer\phpDox\Collector\SourceFile::getSource() must be of the type string, null returned

#0 /mnt/c/Work/ProjectName/htdocs/vendor/theseer/phpdox/src/collector/Collector.php(101): TheSeer\phpDox\Collector\Backend\PHPParser->parse()
#1 /mnt/c/Work/ProjectName/htdocs/vendor/theseer/phpdox/src/collector/Collector.php(71): TheSeer\phpDox\Collector\Collector->processFile()
#2 /mnt/c/Work/ProjectName/htdocs/vendor/theseer/phpdox/src/Application.php(88): TheSeer\phpDox\Collector\Collector->run()
#3 /mnt/c/Work/ProjectName/htdocs/vendor/theseer/phpdox/src/CLI.php(120): TheSeer\phpDox\Application->runCollector()
#4 /mnt/c/Work/ProjectName/htdocs/vendor/theseer/phpdox/phpdox(68): TheSeer\phpDox\CLI->run()
theseer commented 5 years ago

Given the line and file this happens at, it should be a duplicate of #356.

Even though you seem to use a -dev release, can you verify that you are using current master? Because that would mean my change didn't actually catch this case. I'd expect an exception rather than a type error.

sjoller commented 5 years ago

I'm on 0.12.0 - I required it with composer (though with --dev option).

I looked at the source, and the changes from https://github.com/theseer/phpdox/commit/ab50417b74b590bd1eef7a61216a4a5c21a8e5d4 are not present, but they're not present either, if I just browse the master on Github...

theseer commented 4 years ago

I'll close this in favor of #397