Question

I've set my pear installation inside my project:

php pyrus.phar mypear c:\apache24\htdocs\my-project\vendor

But it creates the following folder structure:

.configsnapshots
docs
downloads
php <---------- Here is where pyrus is installing pear + pear2 packages
tests
.pear2registry

Then, should I just add \my-project\vendor\php to my include_path and just require the clases?

Was it helpful?

Solution

PEAR packages not only ship PHP code, but also unit tests, documentation and data files (e.g. font files for barcodes or figlets). The directory structure you see is the result of this separation.

So yes, add the php dir to your include path and start requiring the files. You may also simply use a PSR-0 compatible autoloader.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top