How should PEAR libraries be incorporated as packages / libraries within PHP frameworks?
Namely, I'm using a package system within a PHP framework - and need those PEAR libraries to be easily redistributable (I'm referring specifically to CodeIgniter's package manager, Sparks) to other users. Would it be better to couple the needed PEAR libraries and their dependencies within the package itself, or to instead do a check when the package is initialized (ie constructor, init, factory, whatever called) and prompt (along with download instructions) that that user install the necessary dependencies?
The latter option may not work for some users who lack either the necessary permissions (ie shared hosting?) or the necessary technical knowledge (don't laugh, I'm serious) to install PEAR libraries, ie framework users, not programmers / system admins.
Coupling opens the risk of code duplication within a project, even if it greatly simplifies making the package "just work". What route would YOU take?
PEAR means “PHP Extension and Application Repository.” It is a framework and distribution system for reusable PHP components. It extends PHP and gives a higher level of programming for all web developers. PEAR is divided into three different classes that are: PEAR Core Components, PEAR Packages, and PECL Packages.
Overview. PHP PEAR packages are software components that developers write in the PHP language. The PHP PEAR Packages interface allows you to search for and add PEAR packages to your website, or view all of your website's available PHP packages.
PEAR is a dying distribution system (just my 2 cents). We don't provide any support via personal channels like PM, email, Skype, TeamViewer! Altrea AF Moderator Posts: 11658 Joined: 17. August 2009 13:05 XAMPP version: several Operating System: Windows 10 Pro x64.
PEAR is a framework and repository for reusable PHP components. PEAR stands for PHP Extension and Application Repository. It contains all types of PHP code snippets and libraries. It also provides a command line interface to install "packages" automatically.
Use Pyrus, the next-gen pear installer and follow the instructions in Using Pyrus To Manage PEAR Installable Vendor Libs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With