Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.7.2

Bug #10751 phpcs fails with fatal error
Submitted: 2007-04-17 06:07 UTC
From: lsolesen Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 0.5.0)
PHP Version: 5.2.0 OS: Windows
Roadmaps: (Not assigned)    
Subscription  


 [2007-04-17 06:07 UTC] lsolesen (Lars Olesen)
Description: ------------ I installed the PHP_CodeSniffer using the pear installer. When trying to run the commandline with the phpcs-command, I get the following error. Fatal Error: Class 'PEAR/Sniffs/Commenting/ClassCommentSniff' not found in File.php line 319. It seems as if the $listenerClass (on windows anyways) are called with \ instead of _ - if I str_replace the $listenerClass with str_replace('\', '_', $listenerClass) it seems to work, but that is probably just an ugly hack.

Comments

 [2007-04-17 13:57 UTC] cwiedmann (Carsten Wiedmann)
I run into the same problem after "pear upgrade-all" :-) I've added a simple path to correct this. In this path I've also replaced some "\n" with PHP_EOL. If someone makes a "phpcs foo.php > out.txt" and open this out.txt in the standard notepad, it looks really strange with "\n". Notepad doesn't understand *nix files. Sorry, I can't add the patch. I get this error message from PEAR: Catchable fatal error: Object of class HTTP_Upload_File could not be converted to string in /usr/local/web/pear.php.net/public_html/bugs/patch-add.php on line 188 BTW: You can have it with email if you want.
 [2007-04-17 23:22 UTC] cwiedmann (Carsten Wiedmann)
Hello again, now I can upload patches (see Bug #10756). But I did not know, that the patch filesize is limited. So I tried to split the patch into two files. But after upload the first part (PHP_CodeSniffer_1of2.diff), I can't upload the second. The result is: I 've removed all the PHP_EOL things. And the real patch for this bug, is in the file "PHP_CodeSniffer.diff". Sorry for this.
 [2007-04-21 01:52 UTC] squiz (Greg Sherwood)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Thanks for the patch. I have applied it and committed to CVS.