PHP 包管理器

发布于 2024-09-03 19:21:06 字数 607 浏览 3 评论 0原文

有谁知道除 PEAR 之外的 PHP 包管理器库(例如 apt 或 yum for linux distros)?我正在开发一个系统,该系统应包含用于模块管理的包管理系统。我设法使用 PEAR 获得了一个可行的解决方案,但是使用 PEAR 客户端来管理 PEAR 安装之外的其他任何事情并不是真正的最佳解决方案,因为它不是为此设计的。我必须修改/扩展它(例如,实现安装/升级操作或将 PEAR 特定文件(如锁定文件)从系统根目录移开),特别是 CLI 客户端代码非常混乱,而且 PHP4.0 非常混乱。因此,也许有人

  • 对替代 PEAR 客户端库有一些建议,该库易于使用和扩展(服务器端有一些很好的实现,如 Pirum 和 pearhub),
  • 适用于用 PHP 编写的完全不同的包管理系统(理想情况下包括依赖项跟踪和不同的通道)
  • 对于如何实现这样一个 PM 系统的一些一般想法(是的,我仍在考虑从头开始实现这样一个系统的想法),

我知道像 Magento 和 symfony 这样的大型系统使用 PEAR 作为他们的 PM。 Magento 使用原始 PEAR 客户端的破解版本(我想避免),symfony 的实现似乎与框架非常集成,但至少从头开始编写客户端是一个很好的起点。无论如何,如果有人有建议:请:)

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 :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

青衫负雪 2024-09-10 19:21:06

还有 Composer

There is Composer also.

吝吻 2024-09-10 19:21:06

您检查过 Maven for PHP 吗?我只在 Java 应用程序的上下文中使用过 Maven,但它确实是这样的:

  • 易于扩展 – 实现 Maven 插件真的很容易
  • 管理依赖项 – 区分编译、测试和运行时依赖项(尽管编译/运行时的区别没有意义)在 PHP 中)。
  • 存储库的建立很简单 - Apache 与 mod_dav 将为您提供一个工作的可写存储库,但您还拥有 Nexus
  • 区分快照和稳定工件;允许使用多种策略来确定何时检查新的快照工件以及存储库从中获取每种类型。

还有很多很多更多的事情。

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.

年华零落成诗 2024-09-10 19:21:06

PEAR2/Pyrus 是为任意应用程序的包管理而构建的。我相信它是按照 apt/yum 架构建模的。

Helgi - PEAR 核心成员 - 在这里介绍了其中的一些内容 - http:// www.slideshare.net/helgith/pear2-pyrus-the-look-ahead 但文档也非常可靠:http://pear.php.net/manual/en/pyrus.extending.installation.php

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文