Search code examples
phpwindowsphpunitpear

Point local version of a PEAR Package to a development path?


I'm trying to fix a bug in a more complex PEAR package (CodeCoverage). So I'd like to have the development version that exists not within my PEAR path:

c:\Programme\PHP\PEAR\PHP

with one on another location, here exemplary:

c:\Dokumente und Einstellungen\hakre\PhpstormProjects\php-code-coverage\PHP\

Is there a common way in PEAR to temporarily switch from the installed package to just the files on another location of the disk?

I tried with placing a symbolic link, but that does not work because I need to link CodeCoverage.php as well which is not possible on Windows XP.

Is there some kind of development switch for this kind of scenario in PEAR or is it just that it's the business of each package to take care of that?

I'm using the CodeCoverage package together with PHPUnit.


Solution

  • I could get it to work by adding it to PHP's include path before the PEAR dir:

    include_path = ".;c:\path\to\php-code-coverage;C:\programme\php\pear"
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    

    Invoking PHPUnit now uses the standard package but the development version of CodeCoverage. No symbolic linking required, editing php.ini is enough.