-
Notifications
You must be signed in to change notification settings - Fork 122
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
Token Exception missing file #271
Comments
Looks like I have to actually setup a Windows VM again to debug this further. |
Hello, I've the same issue, I applied a quick and dirty fix locally to make it work by replacing file:/ with file:/// in the $path variable in the current() function of the TokenFileIterator class. |
Same here, Windows 10, phpdox 0.11.2 |
As stated before, I do not use windows.
I still fail to reproduce this. Output from PHP 7.0.8 and phar of 0.11.2 processing phpdox' own code base:
It's slow (probably due to the slow VM disc I/O) but completes just fine. What do I have to do to reproduce this? |
Hej @theseer ,
Now, when trying to "composer require --dev theseer/phpdox", i get this error:
The phpdox.phar generates the above error when trying to use the generator, the collector is running well, only on "php build\tools\phpdox.phar -g" it goes like:
So, in my optionen, there are 2 todos:
Regards.... |
Hi, thanks for the pointers. Regarding your two todos:
This is currently a "Won't fix" as PHP-Parser 4.x does not run under PHP 5.6. Since phpDox - at least the 0.11.x-Series - is bound to run with PHP 5.6, I can't change that yet. I certainly will update it to PHP-Parser 4 for the next version. On a related note: I don't care about composer install-ability of phpDox. You're not supposed to mangle dependencies of various tools and your own software into one installable set. Use phars for tools and you don't have a problem.
Windows for maybe historic reasons loves drive letters. There is no way a drive letter can be removed from a path and it would still work. The problem rather seems to be the arcane syntax with The hack by @EricReichenbach replacing I'm a bit reluctant to make a change in the code that I cannot see the result from ;) |
Still trying to reproduce this. Next attempt with a default laraval sample project (blog), following the documented way of installation:
Create two phpdox configruations, one for the app itself and one for the framework as dependency:
Adjusted them so they look as this:
<?xml version="1.0" encoding="utf-8"?>
<phpdox xmlns="http://xml.phpdox.net/config" silent="false">
<project name="vendor" source="${basedir}/vendor" workdir="${basedir}/build/phpdox/vendor">
<collector publiconly="false" backend="parser" encoding="auto">
<include mask="*.php"/>
<exclude mask="*test*"/>
<exclude mask="*Tests*"/>
<inheritance resolve="true"/>
</collector>
</project>
</phpdox>
<?xml version="1.0" encoding="utf-8"?>
<phpdox xmlns="http://xml.phpdox.net/config" silent="false">
<project name="phpdox" source="${basedir}/app" workdir="${basedir}/build/phpdox/xml">
<collector publiconly="false" backend="parser" encoding="auto">
<include mask="*.php"/>
<exclude mask=""/>
<inheritance resolve="true">
<dependency path="${basedir}/build/phpdox/vendor" />
</inheritance>
</collector>
<generator output="${basedir}/docs">
<enrich base="${basedir}/build"/>
<build engine="html" enabled="true" output="html">
<template dir="${phpDox.home}/templates/html"/>
<file extension="xhtml"/>
</build>
</generator>
</project>
</phpdox> Run phpdox for vendor in collector only mode:
And finally, running the main thing:
Again, I fail to reproduce this issue. |
Glad you post such much information. I do not know, what exacly was wrong, but here is the "original" phpdox.xml, what was not working.
With the "phpdox.xml.dist" you pasted above, it all works well. Thankfull for your help... |
Yay!
Finally :-) Okay, now let's try to understand why that actually happens and how the f***k the configuration difference can be the cause. Thanks! |
Glad i can help 😄 |
The only relevant difference is the value of the In your config.xml: <project name="PName" source="app" workdir="build/phpdox"> vs. In mine: <project name="PName" source="app" workdir="${basedir}/build/phpdox"> Interesting... |
I have been playing around with the paths in my config now for a couple of hours, but still to no avail, the error remains:
The file "file:/C:/Program Files..." exists, but can't be found by phpdox, also I'm using the phar-file, so there's no way to apply the mentioned hack to get file:///. [Modified by @theseer for readability] |
@knallcharge Can you paste the |
@theseer Thanks for getting back, here you go:
I've tried just "phpdox/xml" as my workdir, but the error remains. |
@knallcharge Your problem is caused by the path containing spaces. If I setup a test-system on a windows 10 VM with spaces i can reproduce your issue. Rather curious, since I considered that problem fixed. Looks like i have to look into how I handle path's more than I thought... |
Okay, for whatever reason and on windows only $dom->documentUri under some conditions I don't fully understand, the path returned is prefixed with This does not happen on Linux or macOS as far as I can tell. As a potentially temporary solution, the prefix of |
@spresnac, @knallcharge Can you verify if that works with a custom build of master? |
@theseer Thanks for looking into this. I'm now getting a different error but I blame it on my custom phar (never build one before):
|
That might have actually been a side effect I didn't test for. I'll have a look. |
I cannot reproduce that on my Win10 VM. I attached a phar to this comment. Given Github doesn't like phars as an attachment here, I had to gzip it. So before running, please |
That did the trick, thanks a bunch!
Results are not showing in my Jenkins, but that's a different story :) |
I was trying to run phpdox on windows server 2012 - but I am getting the error:
I've checked the location, the file is not missing.
I'm running into this problem during continuous integration process with jenkins. It is very strange, because the same phpdox version did work for me on ubuntu. Maybe this is related to the fact, that all programs lay on "C:", including Jenkins - but the workspace lays on "D:"? Or is this a bug?
The text was updated successfully, but these errors were encountered: