{"id":156552,"date":"2020-09-17T16:59:22","date_gmt":"2020-09-17T08:59:22","guid":{"rendered":"http:\/\/4563.org\/?p=156552"},"modified":"2020-09-17T16:59:22","modified_gmt":"2020-09-17T08:59:22","slug":"%e6%b7%b1%e5%a4%9c%e6%8f%90%e9%97%ae-%e8%af%b8%e4%bd%8d-phper-%e7%9a%84-composer-%e9%83%a8%e7%bd%b2%e6%b5%81%e7%a8%8b%e6%98%af%e6%80%8e%e4%b9%88%e6%a0%b7%e7%9a%84","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=156552","title":{"rendered":"[\u6df1\u591c\u63d0\u95ee] \u8bf8\u4f4d phper \u7684 composer \u90e8\u7f72\u6d41\u7a0b\u662f\u600e\u4e48\u6837\u7684"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  [\u6df1\u591c\u63d0\u95ee] \u8bf8\u4f4d phper \u7684 composer \u90e8\u7f72\u6d41\u7a0b\u662f\u600e\u4e48\u6837\u7684               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : WriteCloser <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>composer \u76ee\u524d\u6211\u4e86\u89e3\u5230\u7684\u57fa\u672c\u662f 3 \u79cd\u65b9\u6cd5<\/p>\n<ol>\n<li>\n<p>\u653e\u8fdb git \u5e93\uff0c\u53d1\u5e03\u53ca\u90e8\u7f72\u3002\u4f46\u662f\u5b98\u65b9\u6709\u6587\u732e\u4e0d\u63a8\u8350\u8fd9\u6837\u53bb\u505a https:\/\/getcomposer.org\/doc\/faqs\/should-i-commit-the-dependencies-in-my-vendor-directory.md<\/p>\n<\/li>\n<li>\n<p>\u5ffd\u7565 vendor \u76ee\u5f55 composer.json \u653e\u8fdb git \u5e93 \u53d1\u5e03\u6267\u884c update \u547d\u4ee4\u53bb\u66f4\u65b0\uff08\u5982\u679c\u66f4\u65b0\u5931\u8d25\u4e86\u4f1a\u9762\u4e34\u4e00\u4e9b\u65e0\u6cd5\u9884\u6599\u7684\u4e8b\u60c5<\/p>\n<\/li>\n<li>\n<p>\u653e\u8fdb CI \u6765\u505a\u6301\u7eed\u96c6\u6210<\/p>\n<\/li>\n<\/ol>\n<p>\u524d\u9762 2 \u79cd\u672c\u83dc\u90fd\u8bd5\u8fc7\u800c\u4e14\u6bd4\u8f83\u597d\u7406\u89e3\uff0c\u4f46\u662f\u5bf9\u6301\u7eed\u96c6\u6210\u5c31\u6bd4\u8f83\u6a21\u7cca\u70b9<\/p>\n<p>\u73b0\u5728\u7528\u7684\u963f\u91cc\u7684\u4e91\u6548 \u6d41\u6c34\u7ebf\u90a3\u5957\u4e1c\u897f<\/p>\n<p>https:\/\/rdc.aliyun.com\/<\/p>\n<p>\u6bd4\u8f83\u7591\u60d1\u7684\u662f composer update \u8fd9\u4e2a\u73af\u8282\u5e94\u8be5\u5728\u4ec0\u4e48\u5730\u65b9\u53bb\u8fdb\u884c<\/p>\n<p>\u73b0\u5728\u624b\u4e0a\u662f\u8fd9\u6837\u73a9\u7684<\/p>\n<p>git -&gt; rdc -&gt; dockerfil -&gt; k8s<\/p>\n<p>ps.\u6709\u5927\u624b\u77e5\u9053 k8s \u600e\u4e48 CD \u8fdb\u76ee\u5f55\u7136\u540e update \u5417<\/p>\n<p>\u6211\u73b0\u5728\u5c1d\u8bd5\u8fd9\u6837\u4f46\u662f\uff0c\u597d\u50cf\u4e0d\u884c<\/p>\n<pre><code>        lifecycle:           postStart:             exec:                command: [\"\/bin\/sh\", \"-c\", \"cd \/www\/blog\/ &amp;&amp; composer update\"] <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>3<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3327302\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : imdong <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7406\u8bba\u4e0a\uff0c\u63d0\u4ea4 composer.lock\uff0c\u5ffd\u7565 vendor \u63d0\u4ea4\u3002<\/p>\n<p>\u5b9e\u9645\u4e0a\uff0c\u5168\u90fd\u52a0\u8fdb\u53bb\uff0c\u9b3c\u77e5\u9053\u7ebf\u4e0a\u4f1a\u51fa\u4ec0\u4e48\u5e7a\u86fe\u5b50\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3327303\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : WriteCloser <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @imdong \u73af\u5883\u4e00\u6bdb\u4e00\u6837\u95ee\u9898\u5c31\u4e0d\u5927\u867d\u7136\u4e0d\u63a8\u8350\uff0c\u4f46\u662f\u8fd9\u6837\u505a\u611f\u89c9\u4e0d\u662f\u6700\u4f18\u89e3                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3327304\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Mitt <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             composer install<\/p>\n<p>\u8d70 lock \u6587\u4ef6\uff0c\u4e00\u822c\u6765\u8bf4 update \u53ea\u5728\u5f00\u53d1\u7684\u65f6\u5019\u505a\u5427\uff0c\u8981\u786e\u4fdd\u90e8\u7f72\u7248\u672c\u4e00\u81f4 composer.lock \u662f\u5fc5\u987b\u8981\u7684\uff0c\u4e5f\u4e0d\u5e94\u8be5\u5728\u90e8\u7f72\u7684\u65f6\u5019 update                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>[\u6df1\u591c\u63d0\u95ee] \u8bf8\u4f4d phper \u7684&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/156552"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=156552"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/156552\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=156552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=156552"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=156552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}