1. <i id='qpkAw'><tr id='qpkAw'><dt id='qpkAw'><q id='qpkAw'><span id='qpkAw'><b id='qpkAw'><form id='qpkAw'><ins id='qpkAw'></ins><ul id='qpkAw'></ul><sub id='qpkAw'></sub></form><legend id='qpkAw'></legend><bdo id='qpkAw'><pre id='qpkAw'><center id='qpkAw'></center></pre></bdo></b><th id='qpkAw'></th></span></q></dt></tr></i><div id='qpkAw'><tfoot id='qpkAw'></tfoot><dl id='qpkAw'><fieldset id='qpkAw'></fieldset></dl></div>
      <tfoot id='qpkAw'></tfoot>

      <small id='qpkAw'></small><noframes id='qpkAw'>

      <legend id='qpkAw'><style id='qpkAw'><dir id='qpkAw'><q id='qpkAw'></q></dir></style></legend>

        • <bdo id='qpkAw'></bdo><ul id='qpkAw'></ul>

        PEAR 和 Composer 有什么区别?

        What is the difference between PEAR and Composer?(PEAR 和 Composer 有什么区别?)
        <legend id='dKBpX'><style id='dKBpX'><dir id='dKBpX'><q id='dKBpX'></q></dir></style></legend>
            <bdo id='dKBpX'></bdo><ul id='dKBpX'></ul>
              <tfoot id='dKBpX'></tfoot>

                    <tbody id='dKBpX'></tbody>

                  <small id='dKBpX'></small><noframes id='dKBpX'>

                1. <i id='dKBpX'><tr id='dKBpX'><dt id='dKBpX'><q id='dKBpX'><span id='dKBpX'><b id='dKBpX'><form id='dKBpX'><ins id='dKBpX'></ins><ul id='dKBpX'></ul><sub id='dKBpX'></sub></form><legend id='dKBpX'></legend><bdo id='dKBpX'><pre id='dKBpX'><center id='dKBpX'></center></pre></bdo></b><th id='dKBpX'></th></span></q></dt></tr></i><div id='dKBpX'><tfoot id='dKBpX'></tfoot><dl id='dKBpX'><fieldset id='dKBpX'></fieldset></dl></div>
                  本文介绍了PEAR 和 Composer 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  PEAR 用于安装 PHP 软件包和 Composer 用于同样的事情.我相信 Composer 可以更好地处理依赖关系,但这是唯一的区别吗?谁能解释这两个包管理器之间的区别并告诉我何时使用哪个?

                  PEAR is used to install a PHP software package and Composer is used for the same thing. I believe Composer handles dependencies better but is that the only difference? Can anybody explain the difference between these two package managers and tell me when to use which?

                  推荐答案

                  将 PEAR 视为已弃用可能有点早,但我不相信它需要很长时间.Composer 正在蓬勃发展和成熟,有很多包和积极的开发.因此,最好将 Composer 用作 PHP 中的 包标准 管理工具.

                  It might be a bit soon to regard PEAR as deprecated but I don't believe it will take long before it is. Composer is thriving and mature with a lot of packages and and active development. Therefore it might be better to use Composer as the standard for package management tool in PHP.

                  对于包维护者来说,使用 PEAR 比较麻烦.因此 PEAR 上的很多代码都已经过时了.开发人员需要在 PEAR 上发布之前对其包进行PEAR-reviewed",因此与 Composer 中可用的包数量相比,可用的包很少/a>.此外,没有办法在 PEAR 中为单个项目安装包.所有软件包都全局安装.使用 Composer,您可以为每个项目安装一个包全局.好吧,PEAR 中缺乏依赖管理,坦率地说,这应该是包管理器做得好的一件事.

                  Using PEAR is more cumbersome for package maintainers. Therefore a lot of the code on PEAR is outdated. A developer needs to get it packages 'PEAR-reviewed' before it might get published on PEAR, so few packages are available compared to the number of packages available in Composer. Also, there is no way to install a package in PEAR for one single project. All packages are installed globally. With Composer you can install packages one a per-project basis or globally. Well and then there is the lack of dependency management in PEAR, which frankly should be the one thing a package manager does well.

                  可以使用 PEAR 而不是使用 Composer 的一件事是安装 PECL 扩展.然而,pickle 使用 Composer 并允许您在 composer.json 文件中定义原生 PHP 扩展依赖项.pickle 项目目前正在经历相当多的发展,还不应该被认为是成熟的.

                  One thing you can do with PEAR and not with Composer is installing PECL extensions. There is however pickle which uses Composer and lets you define native PHP extentions dependencies in your composer.json file. The pickle project is momentarily undergoing quite some development and should not yet be considered mature.

                  Fabien Potencier 的这篇博文可能有点自以为是,但我认为这是非常正确的.如果您有选择,请选择 Composer,这样 PEAR 就可以安详地死去.即使您询问 PEAR 维护人员,大多数人都会告诉您您认为 Composer 是前进的方向,尽管有些人可能仍然对 Pyrus 抱有希望.(这是为了对 PEAR 进行改进,但在 Composer 的爆炸式流行中被埋没了.)

                  This blog post by Fabien Potencier might be a bit opinionated, but I think it is quite right. If you have an option, choose Composer so PEAR can die in peace. Even when you ask the PEAR maintainers most will tell you that Composer is the way forward, although some might still have their hopes for Pyrus. (This was intended to be PEAR improved, but got kindof buried under the exploding popularity of Composer.)

                  顺便说一句,您也可以使用 Composer 安装 PEAR 包,请参阅 Composer 文档.

                  By the way, you can use Composer to install PEAR packages as well, see the Composer documentation.

                  另请参阅:
                  [1] 关于 PHP 包管理的信息幻灯片

                  这篇关于PEAR 和 Composer 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Converting string to MySQL timestamp format in php(在php中将字符串转换为MySQL时间戳格式)
                  datetime to timestamp(日期时间到时间戳)
                  PHP timestamp date to user timezone(PHP时间戳日期到用户时区)
                  Converting TIMESTAMP to unix time in PHP?(在 PHP 中将 TIMESTAMP 转换为 unix 时间?)
                  Convert ISO 8601 to unixtimestamp(将 ISO 8601 转换为 unixtimestamp)
                  Finding days between 2 unix timestamps in php(在php中查找2个unix时间戳之间的天数)
                  <legend id='Oz3wU'><style id='Oz3wU'><dir id='Oz3wU'><q id='Oz3wU'></q></dir></style></legend>

                  <small id='Oz3wU'></small><noframes id='Oz3wU'>

                    <tbody id='Oz3wU'></tbody>

                  1. <i id='Oz3wU'><tr id='Oz3wU'><dt id='Oz3wU'><q id='Oz3wU'><span id='Oz3wU'><b id='Oz3wU'><form id='Oz3wU'><ins id='Oz3wU'></ins><ul id='Oz3wU'></ul><sub id='Oz3wU'></sub></form><legend id='Oz3wU'></legend><bdo id='Oz3wU'><pre id='Oz3wU'><center id='Oz3wU'></center></pre></bdo></b><th id='Oz3wU'></th></span></q></dt></tr></i><div id='Oz3wU'><tfoot id='Oz3wU'></tfoot><dl id='Oz3wU'><fieldset id='Oz3wU'></fieldset></dl></div>
                        <bdo id='Oz3wU'></bdo><ul id='Oz3wU'></ul>

                          • <tfoot id='Oz3wU'></tfoot>