1

I am new to PEAR thing in PHP and I want to install PHP CodeSniffer & PHP MessDetector. I am using PHP Storm as my editor.

My XAMPP installation directory is D i.e. D:\xampp\

I have downloaded CodeSniffer and Mess Detector and installed it manually (copy files and folders) under below location

D:\xampp\php\PEAR\PHP\

What I need to know is

1) Is the file location correct to install PEAR Packages ?

2) How can I set custom ruleset for Code Sniffer and Mess Detector in PHP Storm ?

Once its done, I then need to install Magento-ECG / Coding-Standard - https://github.com/magento-ecg/coding-standard

Thanks.

Slimshadddyyy
  • 4,085
  • 5
  • 59
  • 121
  • You should use *pear* itself to install those packages -- simple copy (most likely) will not do much. – LazyOne Mar 11 '14 at 09:55
  • I am using a windows system and found it confusing to install using pear. – Slimshadddyyy Mar 11 '14 at 09:58
  • 1
    I'm using Windows too. Are you saying that executing single command **`pear install PHP_CodeSniffer`** is confusing? – LazyOne Mar 11 '14 at 10:05
  • No, actually I did it but it shows error for mkdir in C: drive and so i opted to install manually – Slimshadddyyy Mar 11 '14 at 10:07
  • Whatever -- it's PEAR issue (most likely you have not configured/installed PEAR itself properly) -- your should ensure that PEAR is working first. – LazyOne Mar 11 '14 at 10:09
  • Regarding custom ruleset: it can be set in `Settings | Inspections | PHP` -- find correct inspection there and choose ruleset you want to use (but provide correct path to CodeSniffer/MessDetector first in `Settings | PHP`) – LazyOne Mar 11 '14 at 10:10
  • PEAR is installed at include_path= D:\xampp\php\PEAR and CodeSniffer files and folders are too uploaded at D:\xampp\php\PEAR\PHP\ – Slimshadddyyy Mar 11 '14 at 10:11
  • Posting the exact mkdir error might help a lot ;-) It sounds like a permission problem. – common sense Mar 11 '14 at 11:19
  • _If_ your PEAR configuration was correct, then with the file locations you mentioned it should have no reason to try and create a directory on your __C:__ drive … – CBroe Mar 11 '14 at 11:22
  • PEAR configuration is fine but it would be great if you can let me know about CodeSniffer installation path location – Slimshadddyyy Mar 11 '14 at 11:28
  • When I try to load my custom ruleset for CodeSniffer it says, check php code sniffer tool configuration – Slimshadddyyy Mar 11 '14 at 11:30
  • If you can't install the CodeSniffer via PEAR because it raises errors then your PEAR installation is misconfigured. Have you tried to install something else? – common sense Mar 12 '14 at 11:13

0 Answers0