-
-
Notifications
You must be signed in to change notification settings - Fork 635
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
Invalid tag_line detected: @param string $idx #461
Comments
This is probably fixed in 2.0.0a4 but we have to test this specific case to be certain |
It seems, to talk globally, that the utf-8 is not properly handled (at least in comments). Solving this issue may solve a lot of other ones I've encountered. |
During investigation this seemed to be caused by a regex in the system though I cannot rule out that the |
I'd like to test is in 2.0.0a4 but when I launch full re-install to get latest release through
I can't launch it at all:
|
Is it possible that you have your own plugin that extends phpDocumentor_Plugin_Core_Listener? |
I have tried to reproduce it with 2.0.0a5 and when I use pear to install it I do not see these error. I assume it is caused by an old name lingering |
I'm sorry this may be out of topic, but here's what I do: olivier@olivier-ubuntu ~/dev # sudo pear uninstall phpdoc/phpDocumentor-alpha
uninstall ok: channel://pear.phpdoc.org/phpDocumentor-2.0.0a6
olivier@olivier-ubuntu ~/dev # phpdoc --help
bash: /usr/bin/phpdoc: Aucun fichier ou dossier de ce type
olivier@olivier-ubuntu ~/dev # sudo pear install --alldeps -f phpdoc/phpDocumentor-alpha
downloading phpDocumentor-2.0.0a6.tgz ...
Starting to download phpDocumentor-2.0.0a6.tgz (1,107,853 bytes)
................................................done: 1,107,853 bytes
install ok: channel://pear.phpdoc.org/phpDocumentor-2.0.0a6
olivier@olivier-ubuntu ~/dev # phpdoc --help
PHP Fatal error: Cannot redeclare class phpDocumentor\Plugin\Core\Listener in /usr/share/php/phpDocumentor/src/phpDocumentor/Plugin/Core/Listener.php on line 194
Fatal error: Cannot redeclare class phpDocumentor\Plugin\Core\Listener in /usr/share/php/phpDocumentor/src/phpDocumentor/Plugin/Core/Listener.php on line 194
olivier@olivier-ubuntu ~/dev # locate phpDocumentor | grep Listener
/usr/share/php/phpDocumentor/src/phpDocumentor/Plugin/ListenerAbstract.php
/usr/share/php/phpDocumentor/src/phpDocumentor/Plugin/Core/Listener.php
olivier@olivier-ubuntu ~/dev # echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/rv/Bin
olivier@olivier-ubuntu ~/dev #``` |
I can make an ugly workaround and add the code in the source file:
But that's not a good solution. |
I can't see any weird things in your locate nor your path. Can you delete the vendor directory from phpDocumentor, download composer.phar from http://getcomposer.org/composer.phar and run |
…throw an error instead of crashing the application
@olivierpons concerning your original bug report: I have made a change that this issue will not cause phpDocumentor to crash but to throw an error and ignore that specific DocBlock |
Hi, Unfortunately I still can't test phpDocumentor...
|
Hmm... the latter appears to be an issue that it would want to use the UnifiedAssetInstaller to remove templates. I must admit; I am utterly flabbergasted at why you keep getting this error and it disturbs me that you are experiencing it. Can you reinstall the application from scratch, run it and when you experience another crash note the file and line number and add the following code on the line before that: print_r(get_declared_classes()); (See http://www.php.net/manual/en/function.get-declared-classes.php for an explanation what that does) The latest print_r should determine which classes are indeed loaded; I hope to find an oddity here, a clue as to what causes this. Thank you for your patience |
I may have found the issue. phpDocumentor used to have classes that did not conform to PSR-0. So in the composer.json I had added the root directory to both a classmap directive and the PSR-0 directive to generate autoload files. |
phpDocumentor used to have classes that did not conform to PSR-0. So in the composer.json I had added the root directory to both a classmap directive and the PSR-0 directive to generate autoload files. This may cause conflicts in certain situation. To be able to remove the classmap I also had to fix a few PSR-0 inconsistencies that caused classes not to be found.
Thank you I'll try ASAP when
will install version upper than phpDocumentor-2.0.0a6.tgz |
I released a new version yesterday so you should be able to test now |
|
I've put in the problematic file
So now it gives:
If I throw and exception before declaring the class I get:
I hope this helps |
I am getting same error |
Hmm.. what I find interesting is that both of you have this error with the Listener. I am going to focus on that and hope that yields something. |
Another angle (I wish I could reproduce this so I could test locally :( ) Can you change the following function in /**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True, if loaded
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
include $file;
return true;
}
} to
This should yield a listing of all classes that are coming through the autoloader with their associated filename. What I hope to see is 2 variations of a $class with the same $filename; this should be the error. |
When I check that file it doesn't have exactly the same declaration as yours:
Anyway I've made the modifications. |
With modifications:
|
It just hit me: the prefixing slash. That class is the only one in that list who has a Let me search the code for this |
If my guess would be correct is that some inconsistency in a piece of software is causing class files to be loaded duplicate if the class is loaded as a string and starting with a \. The first attempt is to fix the symptom by removing the slash. If that works then we need to strip prefixing slashes when loading classes from the plugin.xml
@olivierpons can you test the latest version on the Develop branch? The issue should be fixed if my assumption is correct |
I'm sorry I just know (and have the time) to test it through:
I don't know how I could test the latest version on the Develop branch. |
No problem; I will do a release in a few days including this fix. I will comment here once it is done. |
I have released a new version on PEAR: 2.0.0a8. |
I have in the moment not much time, but a little test with Yii brought a Am 27.07.2012 06:13, schrieb Mike van Riel:
|
It works! . OMFG! the output graph class is incredible! You're my man! \o/ Incredible work! Documentation far better, less errors, keep on the good work, it's astonishing! |
Hi,
This is a very simple to reproduce bug: just create a DocBlock with a parameter and an accentued char at the end (here it's the "à":
Try to compile, you get an error:
Now just move the "à" to the next line (= no "spécial char" in the param line):
You'll get no error!
The text was updated successfully, but these errors were encountered: