久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

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

      <i id='sX73i'><tr id='sX73i'><dt id='sX73i'><q id='sX73i'><span id='sX73i'><b id='sX73i'><form id='sX73i'><ins id='sX73i'></ins><ul id='sX73i'></ul><sub id='sX73i'></sub></form><legend id='sX73i'></legend><bdo id='sX73i'><pre id='sX73i'><center id='sX73i'></center></pre></bdo></b><th id='sX73i'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='sX73i'><tfoot id='sX73i'></tfoot><dl id='sX73i'><fieldset id='sX73i'></fieldset></dl></div>

        <tfoot id='sX73i'></tfoot>
      1. <legend id='sX73i'><style id='sX73i'><dir id='sX73i'><q id='sX73i'></q></dir></style></legend>
      2. 使用 Composer 的開(kāi)發(fā)/生產(chǎn)切換時(shí)如何正確部署?

        How to deploy correctly when using Composer#39;s develop / production switch?(使用 Composer 的開(kāi)發(fā)/生產(chǎn)切換時(shí)如何正確部署?)
      3. <i id='7fxKn'><tr id='7fxKn'><dt id='7fxKn'><q id='7fxKn'><span id='7fxKn'><b id='7fxKn'><form id='7fxKn'><ins id='7fxKn'></ins><ul id='7fxKn'></ul><sub id='7fxKn'></sub></form><legend id='7fxKn'></legend><bdo id='7fxKn'><pre id='7fxKn'><center id='7fxKn'></center></pre></bdo></b><th id='7fxKn'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7fxKn'><tfoot id='7fxKn'></tfoot><dl id='7fxKn'><fieldset id='7fxKn'></fieldset></dl></div>

        1. <tfoot id='7fxKn'></tfoot>
              <tbody id='7fxKn'></tbody>
            <legend id='7fxKn'><style id='7fxKn'><dir id='7fxKn'><q id='7fxKn'></q></dir></style></legend>

              <small id='7fxKn'></small><noframes id='7fxKn'>

                • <bdo id='7fxKn'></bdo><ul id='7fxKn'></ul>
                  本文介紹了使用 Composer 的開(kāi)發(fā)/生產(chǎn)切換時(shí)如何正確部署?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  Composer 可以選擇僅在開(kāi)發(fā)過(guò)程中加載多個(gè)依賴項(xiàng),因此這些工具不會(huì)安裝在生產(chǎn)中(在實(shí)時(shí)服務(wù)器上).這(理論上)對(duì)于僅在開(kāi)發(fā)中有意義的腳本非常方便,例如測(cè)試、假數(shù)據(jù)工具、調(diào)試器等.

                  Composer has the option to load several dependencies only while being in development, so the tools will not be installed in production (on the live server). This is (in theory) very handy for scripts that only make sense in development, like tests, fake-data-tools, debugger, etc.

                  要走的路是添加一個(gè)額外的 require-dev 塊,其中包含您在 dev 中需要的工具:

                  The way to go is to add an additional require-dev block with the tools you need in dev:

                  "require-dev": {
                      "codeception/codeception": "1.6.0.3"
                  }
                  

                  然后(理論上)通過(guò)

                  composer install --dev
                  

                  問(wèn)題&問(wèn)題:

                  Composer 在 2013 年顯著改變了 installupdate 的行為,require-dev-dependencies 現(xiàn)在默認(rèn)安裝(!), 隨意創(chuàng)建一個(gè)帶有 require-dev 塊的 composer.json 并執(zhí)行 composer install 來(lái)重現(xiàn).

                  Problem & Question:

                  Composer has changed the behaviour of install and update dramatically in 2013, require-dev-dependencies are now installed by default (!), feel free to create a composer.json with a require-dev block and perform an composer install to reproduce.

                  最普遍的部署方式是推送 composer.lock(保存您當(dāng)前的 composer 設(shè)置),然后在生產(chǎn)服務(wù)器上執(zhí)行 composer install,這也將安裝開(kāi)發(fā)的東西.

                  As the most accepted way to deploy is to push the composer.lock (that holds your current composer setup) and then do an composer install on the production server, this will also install the development stuff.

                  安裝 -dev 依賴項(xiàng)的正確部署方法是什么?

                  What's the correct way to deploy this without installing the -dev dependencies ?

                  注意:我試圖在這里創(chuàng)建一個(gè)規(guī)范的問(wèn)答來(lái)澄清奇怪的 Composer 部署.隨意編輯這個(gè)問(wèn)題.

                  推薦答案

                  為什么

                  恕我直言,現(xiàn)在 Composer 將默認(rèn)使用 --dev 標(biāo)志(在安裝 更新時(shí))是有充分理由的.Composer 主要在需要這種行為的場(chǎng)景中運(yùn)行:

                  There is IMHO a good reason why Composer will use the --dev flag by default (on install and update) nowadays. Composer is mostly run in scenario's where this is desired behavior:

                  基本的 Composer 工作流程如下:

                  The basic Composer workflow is as follows:

                  • 啟動(dòng)一個(gè)新項(xiàng)目:composer.phar install --dev,將json和lock文件提交給VCS.
                  • 其他開(kāi)發(fā)人員開(kāi)始參與該項(xiàng)目:簽出 VCS 和 composer.phar install --dev.
                  • 開(kāi)發(fā)者添加依賴:composer.phar require ,如果你想要require-dev中的包,添加--dev代碼>部分(并提交).
                  • 其他人繼續(xù):(結(jié)帳和)composer.phar install --dev.
                  • 開(kāi)發(fā)人員想要更新版本的依賴項(xiàng):composer.phar update --dev (并提交).
                  • 其他人繼續(xù):(結(jié)帳和)composer.phar install --dev.
                  • 項(xiàng)目已部署:composer.phar install --no-dev
                  • A new project is started: composer.phar install --dev, json and lock files are commited to VCS.
                  • Other developers start working on the project: checkout of VCS and composer.phar install --dev.
                  • A developer adds dependancies: composer.phar require <package>, add --dev if you want the package in the require-dev section (and commit).
                  • Others go along: (checkout and) composer.phar install --dev.
                  • A developer wants newer versions of dependencies: composer.phar update --dev <package> (and commit).
                  • Others go along: (checkout and) composer.phar install --dev.
                  • Project is deployed: composer.phar install --no-dev

                  如您所見(jiàn),--dev 標(biāo)志的使用(遠(yuǎn))多于 --no-dev 標(biāo)志,尤其是當(dāng)開(kāi)發(fā)人員的數(shù)量較多時(shí)項(xiàng)目成長(zhǎng).

                  As you can see the --dev flag is used (far) more than the --no-dev flag, especially when the number of developers working on the project grows.

                  生產(chǎn)部署

                  在不安裝dev"的情況下部署它的正確方法是什么?依賴?

                  What's the correct way to deploy this without installing the "dev" dependencies?

                  好吧,composer.jsoncomposer.lock 文件應(yīng)該提交給 VCS.不要省略 composer.lock,因?yàn)樗嘘P(guān)應(yīng)該使用的包版本的重要信息.

                  Well, the composer.json and composer.lock file should be committed to VCS. Don't omit composer.lock because it contains important information on package-versions that should be used.

                  在執(zhí)行生產(chǎn)部署時(shí),您可以將 --no-dev 標(biāo)志傳遞給 Composer:

                  When performing a production deploy, you can pass the --no-dev flag to Composer:

                  composer.phar install --no-dev
                  

                  composer.lock 文件可能包含有關(guān)開(kāi)發(fā)包的信息.這沒(méi)關(guān)系.--no-dev 標(biāo)志將確保未安裝這些開(kāi)發(fā)包.

                  The composer.lock file might contain information about dev-packages. This doesn't matter. The --no-dev flag will make sure those dev-packages are not installed.

                  當(dāng)我說(shuō)生產(chǎn)部署"時(shí),我指的是旨在用于生產(chǎn)的部署.我不是在爭(zhēng)論 composer.phar install 是否應(yīng)該在生產(chǎn)服務(wù)器上完成,或者在可以審查事情的臨時(shí)服務(wù)器上完成.這不是這個(gè)答案的范圍.我只是指出如何在不安裝dev"的情況下composer.phar install依賴.

                  When I say "production deploy", I mean a deploy that's aimed at being used in production. I'm not arguing whether a composer.phar install should be done on a production server, or on a staging server where things can be reviewed. That is not the scope of this answer. I'm merely pointing out how to composer.phar install without installing "dev" dependencies.

                  離題

                  --optimize-autoloader 標(biāo)志在生產(chǎn)環(huán)境中也可能是可取的(它會(huì)生成一個(gè)類映射來(lái)加速應(yīng)用程序的自動(dòng)加載):

                  The --optimize-autoloader flag might also be desirable on production (it generates a class-map which will speed up autoloading in your application):

                  composer.phar install --no-dev --optimize-autoloader
                  

                  或者在自動(dòng)部署完成后:

                  Or when automated deployment is done:

                  composer.phar install --no-ansi --no-dev --no-interaction --no-plugins --no-progress --no-scripts --optimize-autoloader
                  

                  如果您的代碼庫(kù)支持它,您可以將 --optimize-autoloader 換成 --classmap-authoritative.更多信息這里

                  If your codebase supports it, you could swap out --optimize-autoloader for --classmap-authoritative. More info here

                  這篇關(guān)于使用 Composer 的開(kāi)發(fā)/生產(chǎn)切換時(shí)如何正確部署?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動(dòng)游標(biāo)不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個(gè)值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動(dòng)程序)

                        <bdo id='YM45h'></bdo><ul id='YM45h'></ul>

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

                          <tbody id='YM45h'></tbody>
                        <tfoot id='YM45h'></tfoot>
                      • <i id='YM45h'><tr id='YM45h'><dt id='YM45h'><q id='YM45h'><span id='YM45h'><b id='YM45h'><form id='YM45h'><ins id='YM45h'></ins><ul id='YM45h'></ul><sub id='YM45h'></sub></form><legend id='YM45h'></legend><bdo id='YM45h'><pre id='YM45h'><center id='YM45h'></center></pre></bdo></b><th id='YM45h'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='YM45h'><tfoot id='YM45h'></tfoot><dl id='YM45h'><fieldset id='YM45h'></fieldset></dl></div>

                            <legend id='YM45h'><style id='YM45h'><dir id='YM45h'><q id='YM45h'></q></dir></style></legend>
                            主站蜘蛛池模板: 亚洲一区二区三区免费在线观看 | 欧美成视频 | 又黄又色 | 天天干精品| 欧美在线国产精品 | 一区二区三区精品在线视频 | 欧美激情综合网 | 国产一级黄色网 | 国产精品久久久久久久久久软件 | 久久国产视频一区 | 91精品国产乱码久久久久久 | 中文字幕在线观看国产 | 欧美视频免费在线 | 国产精品视频一区二区三区 | 在线2区| 中文字幕精品视频 | 亚洲精品乱码久久久久久黑人 | 日本中文字幕一区 | 国产精品射 | 亚洲综合色自拍一区 | 国产日韩精品在线 | 精品av| 先锋资源在线 | 日韩精品久久久久久 | 久久久久亚洲精品 | 国产真实精品久久二三区 | 色综合久 | 亚洲永久精品国产 | 精品欧美一区免费观看α√ | 日本午夜网 | 四虎国产| 一级黄色录像片子 | 91视频在线 | 久久久蜜桃| 在线一区 | 日干夜干| 韩国av一区二区 | 中文字幕1区 | 黄一级| 日韩成人免费在线视频 | 亚洲精品一区国语对白 |