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

Request #13269 phpcs doesn't check if tokenizer extension is installed
Submitted: 2008-02-29 18:44 UTC
From: temp Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.0.1)
PHP Version: 5.2.5 OS: Gentoo Linux
Roadmaps: 1.1.0    
Subscription  


 [2008-02-29 18:44 UTC] temp (Stephan Wentz)
Description: ------------ Just installed PHP_CodeSniffer on a fairly new Gentoo server, php is compiled with standard gentoo use-flags. In the standard php-flags "tokenizer" support is _not_ enabled. Calling phpcs resulted in a lot of tokenizer-related errors, the PHP_CodeSniffer package should check if the tokenizer-extension is installed and produce a warning and exit if it is not available. Test script: --------------- phpcs test.php Expected result: ---------------- coding standard errors ;-) Actual result: -------------- tokenizer errors ;-)

Comments

 [2008-02-29 22:07 UTC] squiz (Greg Sherwood)
The PHP manual states: Beginning with PHP 4.3.0 these functions are enabled by default. For older versions you have to configure and compile PHP with --enable-tokenizer. You can disable tokenizer support with --disable-tokenizer. Does the default Gentoo install disable tokenizer support for PHP5?
 [2008-03-03 04:09 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.
 [2008-03-03 08:51 UTC] temp (Stephan Wentz)
Just took a closer look on non-webserver-gentoo machine, the tokenizer use-flag is disabled by default, and php is built with --disable-tokenizer. You have to activate it by hand.