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

Call to undefined method TheSeer\phpDox\Collector\ClassObject::addImplementor() #242

Closed
lfluvisotto opened this issue Aug 7, 2015 · 3 comments

Comments

@lfluvisotto
Copy link

I am getting this error when I execute by the first time.

But if I execute again it works ok.

$ phpdox -f build/phpdox.xml
phpDox 0.8.1.1 - Copyright (C) 2010 - 2015 by Arne Blankerts

[07.08.2015 - 00:11:49] Using config file 'build/phpdox.xml'
[07.08.2015 - 00:11:49] Registered collector backend 'parser'
[07.08.2015 - 00:11:49] Registered enricher 'build'
[07.08.2015 - 00:11:49] Registered enricher 'git'
[07.08.2015 - 00:11:49] Registered enricher 'checkstyle'
[07.08.2015 - 00:11:49] Registered enricher 'phpcs'
[07.08.2015 - 00:11:49] Registered enricher 'pmd'
[07.08.2015 - 00:11:49] Registered enricher 'phpunit'
[07.08.2015 - 00:11:49] Registered enricher 'phploc'
[07.08.2015 - 00:11:49] Registered output engine 'xml'
[07.08.2015 - 00:11:49] Registered output engine 'html'
[07.08.2015 - 00:11:49] Starting to process project 'Box'
[07.08.2015 - 00:11:49] Starting collector
[07.08.2015 - 00:11:49] Scanning directory 'src' for files to process

.................................................. [50]
.................................................. [100]
................................ [132]

[07.08.2015 - 00:11:55] Saving results to directory '/home/leandroluvisotto/Box/build/phpdox/xml'
[07.08.2015 - 00:11:58] Resolving inheritance

.................................................. [50]
.................................................. [100]
.................

Oups... phpDox encountered a problem and has terminated!

It most likely means you've found a bug, so please file a report for this
and paste the following details and the stacktrace (if given) along:

PHP Version: 5.3.10-1ubuntu3.19 (Linux)
PHPDox Version: 0.8.1.1
ErrorException: E_ERROR
Location: phar:///usr/local/bin/phpdox/phpdox/collector/InheritanceResolver.php (Line 215)

Call to undefined method TheSeer\phpDox\Collector\ClassObject::addImplementor()

No stacktrace available

@theseer
Copy link
Owner

theseer commented Aug 7, 2015

The crash happens because - for a yet to be determined reason - phpDox tries to add an Implementor to a class. That can technically not happen as a class can never be "implemented" by another.

I'll look into that. Can you potentially provide me with a sample code to trigger this?

@lfluvisotto
Copy link
Author

I am not able to give a sample code because I am over a NDA.

I am trying to understand why if I execute again it works ok.

Looks like when I already have the xml folder and its XML files, it acts like a cache and the html files are generated without problems.

@theseer theseer closed this as completed in 950b451 Jan 9, 2018
@theseer
Copy link
Owner

theseer commented Jan 9, 2018

For future reference, the following broken code triggered this crash:

class foo { }

class bar implements foo { }

This is now detected and reported.

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

No branches or pull requests

2 participants