Including Pear Libraries in PHP Frameworks

How should PEAR libraries be included as packages / libraries in PHP framework?

Namely, I use the package system inside the PHP framework and need these PEAR libraries to be easily redistributable (I mean specifically for the CodeIgniter, Sparks package manager) to other users. It would be better to link the required PEAR libraries and their dependencies inside the package itself or instead check when the package is initialized (i.e., constructor, init, factory, any called) and the invitation (along with the download instructions) that this user installs the necessary dependencies ?

The latter option may not work for some users who do not need either the necessary permissions (for example, shared hosting?), Or the necessary technical knowledge (do not laugh, I'm serious) to install PEAR libraries, that is, users of the system, not programmers / system administrators.

Linking poses the risk of code duplication within a project, even if it greatly simplifies the creation of a β€œjust work” package. Which route do you take?

+6
source share
1 answer

Use Pyrus, the next-generation pear installer, and follow the instructions in Using Pyrus to manage PEAR Installable Vendor Libs .

+3
source

Source: https://habr.com/ru/post/892102/


All Articles