[pkg-php-pear] Questions: autoloaders and contributing new packages

Robin Gustafsson robin at rgson.se
Wed Dec 11 10:48:18 GMT 2019


Hi,

I'm in the process of packaging some PHP libraries that are otherwise
distributed using Composer. I've never done that before, so naturally I've been
looking at existing packages to figure out what to do. So far so good, but I
have some questions:

Firstly, from what I can tell, most of your packages contain a package-specific
autoload.php file. This file seems to serve several purposes:
- registering an autoloader for the packaged classes
- loading any non-autoloadable files (e.g. functions.php, helpers.php)
- including the autoload.php of each of its own dependencies
  (require_once for Depends and conditional include_once for Suggests)

It seems customary to generate such an autoloader even in cases where the
package could've been adequately loaded by a general-purpose PSR-4 autoloader
(e.g. php-psr-container), presumably for consistency and ease of use.

Is this a correct interpretation?

Secondly, while I'm originally packaging these libraries for other reasons, I'd
like to contribute them to Debian in the end. It'd be my first time contributing
packages, but I do have a potential sponsor. However, it seems preferable for
me to maintain the packages under the umbrella of this team if possible,
considering my lack of experience maintaining official Debian packages.

What'd be the process for joining and/or submitting new packages to this team?


Regards,
Robin Gustafsson



More information about the pkg-php-pear mailing list