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

E_ERROR #428

Open
hgodinho opened this issue Aug 7, 2023 · 4 comments
Open

E_ERROR #428

hgodinho opened this issue Aug 7, 2023 · 4 comments

Comments

@hgodinho
Copy link

hgodinho commented Aug 7, 2023

vendor/bin/phpdox
phpDox %development% - Copyright (C) 2010 - 2023 by Arne Blankerts

[07.08.2023 - 12:07:53] Using config file './phpdox.xml'
[07.08.2023 - 12:07:53] Registered enricher 'build'
[07.08.2023 - 12:07:53] Registered enricher 'git'
[07.08.2023 - 12:07:53] Registered enricher 'checkstyle'
[07.08.2023 - 12:07:53] Registered enricher 'phpcs'
[07.08.2023 - 12:07:53] Registered enricher 'pmd'
[07.08.2023 - 12:07:53] Registered enricher 'phpunit'
[07.08.2023 - 12:07:53] Registered enricher 'phploc'
[07.08.2023 - 12:07:53] Registered output engine 'xml'
[07.08.2023 - 12:07:53] Registered output engine 'html'

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: 8.1.10 (WINNT)
PHPDox Version: %development%
ErrorException: E_ERROR
Location: C:\Users\55119\Elucidário.art\elucidario\packages\core\vendor\theseer\phpdox\src\shared\ErrorHandler.php (Line 106)

Uncaught TypeError: TheSeer\phpDox\ErrorHandler::handleException(): Argument #1 ($exception) must be of type Exception, TypeError given in C:\Users\55119\Elucidário.art\elucidario\packages\core\vendor\theseer\phpdox\src\shared\ErrorHandler.php:106
Stack trace:
#0 [internal function]: TheSeer\phpDox\ErrorHandler->handleException(Object(TypeError))
#1 {main}
thrown

No stacktrace available

@theseer theseer added the Bug label Aug 8, 2023
@theseer
Copy link
Owner

theseer commented Aug 8, 2023

Thanks for reporting your issue and an obvious crash of phpDox.

Unfortunately, the location in the error message (ErrorHandler.php, line 106) doesn't make any sense with the current versions of phpDox. Even ignoring the line, the error message doesn't make sense given the code fragment in question doesn't use type declarations - as it should ;-), so the above error should not be possible.

Can you provide any more context on how this error occurred?

@theseer theseer added the Pending label Aug 8, 2023
@hgodinho
Copy link
Author

hgodinho commented Aug 8, 2023

This is my first time using phpDox, I could probably be doing something wrong.
I've installed via composer

{
   "require-dev": {
        "automattic/vipwpcs": "*",
        "dealerdirect/phpcodesniffer-composer-installer": "0.7.2",
        "dingo-d/wp-pest-integration-test-setup": "^1.6",
        "php-stubs/wordpress-stubs": "^6.2",
        "phpcompatibility/phpcompatibility-wp": "*",
        "squizlabs/php_codesniffer": "^3.7",
        "wp-cli/wp-cli-bundle": "*",
        "wp-coding-standards/wpcs": "2.3.0",
        "theseer/phpdox": "*"
    }
}

And used the skel command to generate phpdox.xml, then run vendor/bin/phpdox

@theseer
Copy link
Owner

theseer commented Aug 8, 2023

Interesting.

I tried copying your approach for a test install. And while phpDox (or rather one of its libraries) has issues with PHP 8.1+, I cannot reproduce your particular crash.

Sorry about that. Does your project happen to be public so I could try to reproduce your isssue? I'm not sure when I'll have time to do that, but I'll try.

@theseer
Copy link
Owner

theseer commented Aug 8, 2023

Can you try running it with PHP 8.0 btw? Just for reference ;)

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

No branches or pull requests

2 participants