phpDocumentor: v3-alpha4/phar not working on Windows ?
I’m unsure whether this is a configuration issue, a Windows issue or a PHPDoc 3 issue, but hopefully providing all this info might yield something.
Happy to try and help debug this further.
Config used
File: phpdoc.xml in the project root.
<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
<title>PHPCSUtils</title>
<files>
<file>autoload.php</file>
<directory>PHPCSUtils</directory>
</files>
<parser>
<target>build/docs/structure/</target>
</parser>
<transformer>
<target>build/docs/output/</target>
</transformer>
<logging>
<level>debug</level>
</logging>
</phpdoc>
I’ve tried setting the <transformations> key and tried nearly all possible templates, but the output is no different.
Command used
phpdoc run from the project root
Output on screen
Complete output
# phpdoc run
PHP 7.1.30 (cli) (built: May 28 2019 15:12:11) ( ZTS MSVC14 (Visual C++ 2015) x86 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
phpDocumentor v3.0.0-alpha.4-6-gc5f3834c
[2019-11-08 10:55:39] app.NOTICE: Using the configuration file at the default location [] []
[2019-11-08 10:55:39] app.INFO: Collecting files .. [] []
[2019-11-08 10:55:43] app.INFO: OK [] []
[2019-11-08 10:55:43] app.INFO: Loading project from cache [] []
[2019-11-08 10:55:43] app.NOTICE: Parsing files [] []
Parsing files
[2019-11-08 10:55:43] app.INFO: Elapsed time to parse all files: 0.01s [] []
[2019-11-08 10:55:43] app.INFO: Peak memory usage: 12M [] []
[2019-11-08 10:55:43] app.NOTICE: Storing cache .. [] []
[2019-11-08 10:55:43] app.INFO: OK [] []
[2019-11-08 10:55:43] app.INFO: Loading project from cache [] []
[2019-11-08 10:55:43] app.INFO: Applying 17 transformations [] []
Applying transformations (can take a while)
[2019-11-08 10:55:43] app.INFO: Initialize writer "phpDocumentor\Transformer\Writer\FileIo" [] []
[2019-11-08 10:55:43] app.INFO: Initialize writer "phpDocumentor\Transformer\Writer\Twig" [] []
[2019-11-08 10:55:43] app.INFO: Initialize writer "phpDocumentor\Transformer\Writer\Graph" [] []
[2019-11-08 10:55:43] app.NOTICE: Writer FileIo using query "copy" on .htaccess [] []
1/17 [=>--------------------------] 5%[2019-11-08 10:55:43] app.NOTICE: Writer FileIo using query "copy" on images [] []
2/17 [===>------------------------] 11%[2019-11-08 10:55:43] app.NOTICE: Writer FileIo using query "copy" on css [] []
3/17 [====>-----------------------] 17%[2019-11-08 10:55:43] app.NOTICE: Writer FileIo using query "copy" on js [] []
4/17 [======>---------------------] 23%[2019-11-08 10:55:43] app.NOTICE: Writer FileIo using query "copy" on font [] []
5/17 [========>-------------------] 29%[2019-11-08 10:55:43] app.NOTICE: Writer twig using query "namespace" on index.html [] []
6/17 [=========>------------------] 35%[2019-11-08 10:55:43] app.NOTICE: Writer twig using query "indexes.namespaces" on [] []
7/17 [===========>----------------] 41%[2019-11-08 10:55:43] app.NOTICE: Writer twig using query "indexes.classes" on [] []
8/17 [=============>--------------] 47%[2019-11-08 10:55:43] app.NOTICE: Writer twig using query "indexes.interfaces" on [] []
9/17 [==============>-------------] 52%[2019-11-08 10:55:43] app.NOTICE: Writer twig using query "indexes.traits" on [] []
10/17 [================>-----------] 58%[2019-11-08 10:55:43] app.NOTICE: Writer twig using query "files" on [] []
11/17 [==================>---------] 64%[2019-11-08 10:55:43] app.NOTICE: Writer twig using query "files" on files/{{path}}.txt [] []
12/17 [===================>--------] 70%[2019-11-08 10:55:43] app.NOTICE: Writer twig on reports/markers.html [] []
13/17 [=====================>------] 76%[2019-11-08 10:55:43] app.NOTICE: Writer twig on reports/errors.html [] []
14/17 [=======================>----] 82%[2019-11-08 10:55:43] app.NOTICE: Writer twig on reports/deprecated.html [] []
15/17 [========================>---] 88%[2019-11-08 10:55:43] app.NOTICE: Writer twig on graphs/class.html [] []
16/17 [==========================>-] 94%[2019-11-08 10:55:43] app.NOTICE: Writer Graph on graphs/classes.svg [] []
17/17 [============================] 100%[2019-11-08 10:55:44] app.NOTICE: Finished transformation process [] []
All done!
Exit code is 0
Expected Behavior
Docs being generated…
Actual Behavior
Some files are generated and put in the /build/docs/ directory.

Note: not the build/docs/output or build/docs/structure directories which are referenced in the config file…
When I open the build/docs/index.html file in a browser, I get:

Your environment
- Version used: 3.0.0-alpha.4-6-gc5f3834c
- Phar downloaded from GH releases page
- PHP 7.1.30
- Windows 7
- Project is not (yet) available online.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 96 (72 by maintainers)
I added a number of new issues that I extracted from this issue. I think this one is ready to be closed.
Thanks again for all the patience and useful input. Contributing to a project is so much more that just pushing code to a repo!
@jaapio Just did a test run with the new phar & PHPCompatibility and so far (phar), so good. Output looks the same as the previous successful run with the git clone (so no class hierarchy chart, but HTML files all seem present & working)
Screen output:
Next, I’ve done a test run with the project which is not yet online and unfortunately, I’m running into an error there, but I think that’s unrelated to the issue being discussed here:
Edit: running over the other project with the git clone install gives the same results without any additional debug information.
No there is nothing you can do right now. I think I’m almost there with a solution that works in the situations the people here reported. I’m fairly sure that there will be more issues regarding windows. Since @mvriel and I do both have a Linux dev system. And all tests that were written are based on expectations.
I found that multiple tests we wrote contained errors just validating wrong behavior. I will report here when a new build is available. But that is gonna take a while since my holidays are over now. So we are back to a evening dev schedule
No, it’s not a network drive
https://github.com/phpDocumentor/phpDocumentor/suites/384811452/artifacts/953699 Ok this new phar should work. I was able to generate documentation for the example project. ~I discovered another issue in the templates.~
~The links to other files in the templates are not always generated correctly. So if you try the phar in this comment you will be able to generate the docs. But when you want to view them you will get 404 errors.~
Issue above is also fixed. updated the link to a working phar 😃
I have some results from a test I did on a virtual machine running windows 10. We still have a small issue that needs to be fixed before you will be able to run phpdocumentor without problems.
So please hold on. no need to test right now.
Our builds can be found here: https://github.com/phpDocumentor/phpDocumentor/actions?query=branch%3Amaster+workflow%3A"Qa+workflow"
Each item has it’s own artifacts. which can be downloaded on the right upper corner. Maybe we can provide a more user friendly list in the future.
Thanks again for all your help. We have definitely some work to do to get this right. Some of the issues you are reporting will have nothing to do with windows. But do require some more testing on our side. Thanks again, I will come back to you when I feel more confident about the parsing process
@jaapio Just out of curiosity, I’ve cloned the repo, ran
composer install, adjusted thephpdoc3.batfile to point to theI:\path\to\phpDocumentor\bin\phpdocfile and done a test run on both projects again and the results are the same in both cases, so the problem definitely isn’t with the Phar file.Hang on, let me try with another project which is online and I’ll get back to you in a moment.