English 中文(简体)
PHP package manager
原标题:

does anyone know a package manager library for PHP (as e.g. apt or yum for linux distros) apart from PEAR? I m working on a system which should include a package management system for module management. I managed to get a working solution using PEAR, but using the PEAR client for anything else than managing a PEAR installation is not really the optimal solution as it s not designed for that. I would have to modify/extend it (e.g. to implement actions on installation/upgrade or to move PEAR specific files like lockfiles away from the system root) and especially the CLI client code is quite messy and PHP4. So maybe someone has some suggestions

  • for an alternative PEAR client library which is easy to use and extend (the server side has some nice implementations like Pirum and pearhub)
  • for completely different package management systems written in PHP (ideally including dependency tracking and different channels)
  • for some general ideas how to implement such a PM system (yes, I m still tinkering with the idea of implementing such a system from scratch)

I know that big systems like Magento and symfony use PEAR for their PM. Magento uses a hacked version of the original PEAR client (which I d like to avoid), symfony s implementation seems quite integrated with the framework, but would be a good starting point to at least write the client from scratch. Anyway, if anybody has suggestions: please :)

最佳回答

There is Composer also.

问题回答

Have you checked Maven for PHP? I ve only used Maven in the context of Java applications, but it s certainly:

  • Easy to extend – it s really easy to implement Maven plugins
  • Manages dependencies – distinguishing compile, test and runtime dependencies (though the compile/runtime distintion doesn t make sense in PHP).
  • Repositories are trivial to put up – Apache with mod_dav will give you a working writable repository, but you also have Nexus.
  • Distinguishes snapshot from stable artifacts; allows several policies for when to check for new snapshot artifacts and from which repositories get each type.

And many – many – more things.

PEAR2/Pyrus was built for package management for arbitrary applications. I believe it was modeled after the apt/yum architectures.

Helgi - core PEAR member - covers some of it here - http://www.slideshare.net/helgith/pear2-pyrus-the-look-ahead but the documentation is pretty solid too: http://pear.php.net/manual/en/pyrus.extending.installation.php





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签