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

Request #17244 Add option to specify PHP setting
Submitted: 2010-03-19 03:25 UTC
From: jasong Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.2)
PHP Version: 5.2.6 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2010-03-19 03:25 UTC] jasong (Jason Gabriele)
Description: ------------ I would like a command line option to specify a PHP ini setting to override the value in php.ini. PHPUnit provides this functionality using -d option=setting. Right now our test fails because it hits the memory limit. Unfortunately, I cannot simply change that ini setting because we our code running on that server as well. Thanks

Comments

 [2010-03-19 03:34 UTC] squiz (Greg Sherwood)
-Assigned To: +Assigned To: squiz
If you would like a workaround, run PHPCS directly using the PHP CLI: php -d memory_limit=512M /path/to/phpcs (haven't tested that memory limit setting, but I'm sure you get the idea)
 [2010-03-19 04:21 UTC] jasong (Jason Gabriele)
I should have realized that workaround. It works fine now. Thanks
 [2010-09-05 23:01 UTC] benmatselby (Ben Selby)
 [2010-09-05 23:03 UTC] benmatselby (Ben Selby)
Would be nice for this to be implemented in the tool so build scripts in tools such as hudson can still specify the executable as phpcs and not php with an argument of phpcs Patch attached
 [2010-09-07 07:43 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. 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, although I decided to implement it a bit differently and use the standard "-d key[=value]" format that people would be used to, even though it doesn't fit with the way phpcs normally does command line args.