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

Probleme with phploc and "conversion to UTF-8 failed #403

Open
pwFoo opened this issue Aug 9, 2020 · 1 comment
Open

Probleme with phploc and "conversion to UTF-8 failed #403

pwFoo opened this issue Aug 9, 2020 · 1 comment

Comments

@pwFoo
Copy link

pwFoo commented Aug 9, 2020

Hi,

tried different ways to install (as described in readme file too), but can't get it work.

phpDox 0.12.0-dev - Copyright (C) 2010 - 2020 by Arne Blankerts and Contributors

[09.08.2020 - 16:03:19] Using config file './phpdox.xml'
[09.08.2020 - 16:03:19] Registered collector backend 'parser'
[09.08.2020 - 16:03:19] Registered enricher 'build'
[09.08.2020 - 16:03:19] Registered enricher 'git'
[09.08.2020 - 16:03:19] Registered enricher 'checkstyle'
[09.08.2020 - 16:03:19] Registered enricher 'phpcs'
[09.08.2020 - 16:03:19] Registered enricher 'pmd'
[09.08.2020 - 16:03:19] Registered enricher 'phpunit'
[09.08.2020 - 16:03:19] Registered enricher 'phploc'
[09.08.2020 - 16:03:19] Registered output engine 'xml'
[09.08.2020 - 16:03:19] Registered output engine 'html'
[09.08.2020 - 16:03:19] Starting to process project 'FlowEngine'
[09.08.2020 - 16:03:19] Starting collector
[09.08.2020 - 16:03:19] Scanning directory '/srv/Flow' for files to process

fffffffffffffff                                         [15]

[09.08.2020 - 16:03:19] The following file(s) had errors during processing and were excluded:
[09.08.2020 - 16:03:19]  - /srv/Flow/Core/Item.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Core/Error.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Core/Loader.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Core/Collection.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/plugins/ModuleNS/Module.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Net/Response.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Net/Route.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Net/Request.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Net/Router.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Engine.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Dispatcher/GlobalHooks.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Dispatcher/Hook.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Dispatcher/HookEvent.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Dispatcher/Hookable.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19]  - /srv/Flow/Dispatcher/Event.php (Encoding error - conversion to UTF-8 failed [SourceFile.php:60])
[09.08.2020 - 16:03:19] Saving results to directory '/tmp/phpdox'
[09.08.2020 - 16:03:19] Collector process completed

[09.08.2020 - 16:03:19] Starting generator
[09.08.2020 - 16:03:19] Loading enrichers
[09.08.2020 - 16:03:19] Enricher Build Information initialized successfully
[09.08.2020 - 16:03:19] Starting event loop.

........                                                [8]

[09.08.2020 - 16:03:19] Generator process completed
[09.08.2020 - 16:03:19] Processing project 'FlowEngine' completed.


Time: 98 ms, Memory: 6.00 MB

Looks like all the files in the project failed to convert?

Generated overview shows a base site with:

Warning: PHPLoc enrichment not enabled or phploc.xml not found.

And the link to the source ./source/index.xhtml is a dead link. No directoy / content there.

@theseer
Copy link
Owner

theseer commented Aug 22, 2020

With all the broken docker installations out there, it's pretty impossible to debug this given the information provided. But I can try to provide a few pointers:

  • phpDox needs all code to be in utf-8 encoding so it can be properly worked with in XML.
  • To achieve this, ext/fileinfo's finfo() is used to detect the current encoding
  • phpDox uses iconv to convert it from the detected encoding to utf-8

Regarding phploc:

You need to have phploc run indepedent of phpDox and have it store its output data into phploc.xml. The path to that file can be configured in the phpDox config xml file.

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