PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » PEAR » PEAR » Bug #5102

Can't package PEAR with PHP 4.x

Details

Submitted2005-08-16 08:41 UTC
Fromieure at php dot net
StatusBogus
PackagePEAR
PHP Version4.3.10
OSDebian GNU/Linux 3.0 (sarge)
Roadmaps(Not assigned)

Comments

[2005-08-16 08:41 UTC] ieure at php dot net

Description:
------------
I think the code which checks whether a PEAR package may
be packaged is doing the wrong thing. It appears to check
for PHP 5.x-only stuff in all role="php" files in the
package, and dies if you aren't running PHP 5. This has a
couple of unintended(? - certainly unhelpful)
consequences:

- It's now impossible to package PEAR itself under PHP 4,
as PEAR_Exception is included.
- Packages which provide PHP 4/5 compatibility may only be
packaged under PHP 5.
- The check is naïve, and it can catch some instances
which are valid PHP 4.x code, e.g. if a file contains a
function called throw().

I'm not clear why it's impossible to package code for PHP
5 under PHP 4. Does package run the files through `php
-l'? PHP 5 packages pass `pear package-validate' fine.

In any case, I'd like to see this change, but I think it
needs some discussion first.

Thoughts?