{"id":21246,"date":"2024-11-19T08:09:40","date_gmt":"2024-11-19T00:09:40","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21246\/"},"modified":"2024-11-19T08:09:40","modified_gmt":"2024-11-19T00:09:40","slug":"composer%e6%9c%89%e4%bb%80%e4%b9%88%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21246\/","title":{"rendered":"composer\u6709\u4ec0\u4e48\u7528"},"content":{"rendered":"<blockquote><p>\n  composer \u4f5c\u4e3a php \u4f9d\u8d56\u7ba1\u7406\u5de5\u5177\uff0c\u8d1f\u8d23\u7ba1\u7406\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u5305\uff0c\u5305\u62ec\uff1a\u5b89\u88c5\u548c\u7ba1\u7406\u4f9d\u8d56\u9879\uff1a\u81ea\u52a8\u5b89\u88c5\u548c\u66f4\u65b0\u5fc5\u9700\u7684\u8f6f\u4ef6\u5305\u3002\u4f9d\u8d56\u9879\u89e3\u6790\uff1a\u9012\u5f52\u89e3\u6790\u4f9d\u8d56\u5173\u7cfb\uff0c\u786e\u4fdd\u6240\u6709\u8f6f\u4ef6\u5305\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u7edf\u4e00\u4f9d\u8d56\u9879\u7248\u672c\uff1a\u8de8\u9879\u76ee\u5f3a\u5236\u6267\u884c\u76f8\u540c\u8f6f\u4ef6\u5305\u7248\u672c\uff0c\u907f\u514d\u7248\u672c\u51b2\u7a81\u3002\u81ea\u52a8\u5316\u4f9d\u8d56\u9879\u7ba1\u7406\uff1a\u63d0\u4f9b cli \u547d\u4ee4\uff0c\u7528\u4e8e\u5b89\u88c5\u3001\u66f4\u65b0\u548c\u5220\u9664\u4f9d\u8d56\u9879\u3002\u72ec\u7acb\u4e8e\u6846\u67b6\uff1a\u53ef\u5728\u4efb\u4f55 php \u4ee3\u7801\u5e93\u4e2d\u4f7f\u7528\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/09\/2024040914212341413.jpg\" class=\"aligncenter\" title=\"composer\u6709\u4ec0\u4e48\u7528\u63d2\u56fe\" alt=\"composer\u6709\u4ec0\u4e48\u7528\u63d2\u56fe\" \/><\/p>\n<p><strong>Composer \u7684\u4f5c\u7528<\/strong><\/p>\n<p>Composer \u662f PHP \u8bed\u8a00\u7684\u4e00\u4e2a\u4f9d\u8d56\u7ba1\u7406\u5de5\u5177\u3002\u5b83\u7528\u4e8e\u7ba1\u7406 PHP \u4ee3\u7801\u5e93\u4e2d\u6240\u4f9d\u8d56\u7684\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u5305\u3002Composer \u7684\u4e3b\u8981\u529f\u80fd\u5305\u62ec\uff1a<\/p>\n<ul>\n<li> <strong>\u5b89\u88c5\u548c\u7ba1\u7406\u4f9d\u8d56\u9879\uff1a<\/strong>Composer \u6839\u636e\u4ee3\u7801\u5e93\u4e2d\u6307\u5b9a\u7684\u8981\u6c42\u81ea\u52a8\u5b89\u88c5\u548c\u66f4\u65b0\u6240\u9700\u7684\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u5305\u3002<\/li>\n<li> <strong>\u4f9d\u8d56\u9879\u89e3\u6790\uff1a<\/strong>Composer \u9012\u5f52\u89e3\u6790\u4f9d\u8d56\u5173\u7cfb\uff0c\u786e\u4fdd\u6240\u6709\u5fc5\u9700\u7684\u8f6f\u4ef6\u5305\u90fd\u5df2\u5b89\u88c5\uff0c\u4e14\u7248\u672c\u517c\u5bb9\u3002<\/li>\n<li> <strong>\u7edf\u4e00\u4f9d\u8d56\u9879\u7248\u672c\uff1a<\/strong>Composer \u5728\u4e0d\u540c\u7684\u9879\u76ee\u95f4\u5f3a\u5236\u6267\u884c\u76f8\u540c\u7684\u8f6f\u4ef6\u5305\u7248\u672c\uff0c\u907f\u514d\u56e0\u7248\u672c\u51b2\u7a81\u5bfc\u81f4\u95ee\u9898\u3002<\/li>\n<li> <strong>\u81ea\u52a8\u5316\u4f9d\u8d56\u9879\u7ba1\u7406\uff1a<\/strong>Composer \u63d0\u4f9b\u547d\u4ee4\u884c\u754c\u9762\uff08CLI\uff09\u547d\u4ee4\uff0c\u7528\u4e8e\u7ba1\u7406\u4f9d\u8d56\u9879\uff0c\u5982\u5b89\u88c5\u3001\u66f4\u65b0\u548c\u5220\u9664\u3002<\/li>\n<li> <strong>\u72ec\u7acb\u4e8e\u6846\u67b6\uff1a<\/strong>Composer \u4e0e\u7279\u5b9a\u6846\u67b6\u65e0\u5173\uff0c\u53ef\u5728\u4efb\u4f55 PHP \u4ee3\u7801\u5e93\u4e2d\u4f7f\u7528\u3002<\/li>\n<\/ul>\n<p><strong>Composer \u7684\u597d\u5904<\/strong><\/p>\n<p>\u4f7f\u7528 Composer \u63d0\u4f9b\u4e86\u8bb8\u591a\u597d\u5904\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li> <strong>\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\uff1a<\/strong>\u81ea\u52a8\u5316\u4f9d\u8d56\u9879\u7ba1\u7406\u53ef\u8282\u7701\u5f00\u53d1\u4eba\u5458\u7684\u65f6\u95f4\u548c\u7cbe\u529b\u3002<\/li>\n<li> <strong>\u51cf\u5c11\u7248\u672c\u51b2\u7a81\uff1a<\/strong>\u901a\u8fc7\u5f3a\u5236\u6267\u884c\u7edf\u4e00\u7684\u4f9d\u8d56\u9879\u7248\u672c\uff0cComposer \u51cf\u5c11\u4e86\u7531\u4e8e\u7248\u672c\u4e0d\u517c\u5bb9\u800c\u5bfc\u81f4\u7684\u95ee\u9898\u3002<\/li>\n<li> <strong>\u6539\u5584\u4ee3\u7801\u7ef4\u62a4\uff1a<\/strong>Composer \u7ef4\u62a4\u4e00\u4e2a\u96c6\u4e2d\u5f0f\u7684\u6587\u4ef6\uff08 .json\uff09\uff0c\u5176\u4e2d\u5217\u51fa\u4e86\u6240\u6709\u4f9d\u8d56\u9879\u548c\u7248\u672c\uff0c\u4fbf\u4e8e\u7ef4\u62a4\u548c\u66f4\u65b0\u4ee3\u7801\u5e93\u3002<\/li>\n<li> <strong>\u589e\u5f3a\u56e2\u961f\u534f\u4f5c\uff1a<\/strong>Composer \u7248\u672c\u9501\u5b9a\u4f9d\u8d56\u9879\uff0c\u786e\u4fdd\u56e2\u961f\u6210\u5458\u4f7f\u7528\u76f8\u540c\u7684\u4f9d\u8d56\u9879\u7248\u672c\uff0c\u4ece\u800c\u6539\u5584\u534f\u4f5c\u3002<\/li>\n<li> <strong>\u6269\u5927\u4ee3\u7801\u5e93\u7684\u53ef\u91cd\u7528\u6027\uff1a<\/strong>Composer \u53ef\u5c06\u4f9d\u8d56\u9879\u96c6\u4e2d\u5728\u4e00\u4e2a\u5730\u65b9\uff0c\u4f7f\u4ee3\u7801\u5e93\u66f4\u5bb9\u6613\u91cd\u7528\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u6709\u4ec0\u4e48\u7528\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>composer \u4f5c\u4e3a php \u4f9d\u8d56\u7ba1\u7406\u5de5\u5177\uff0c\u8d1f\u8d23\u7ba1\u7406\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u5305\uff0c\u5305\u62ec\uff1a\u5b89\u88c5\u548c\u7ba1\u7406\u4f9d\u8d56\u9879\uff1a\u81ea\u52a8\u5b89\u88c5\u548c\u66f4\u65b0\u5fc5\u9700\u7684\u8f6f\u4ef6\u5305\u3002\u4f9d\u8d56\u9879\u89e3\u6790\uff1a\u9012\u5f52\u89e3\u6790\u4f9d\u8d56\u5173\u7cfb\uff0c\u786e\u4fdd\u6240\u6709\u8f6f\u4ef6\u5305\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u7edf\u4e00\u4f9d\u8d56\u9879\u7248\u672c\uff1a\u8de8\u9879\u76ee\u5f3a\u5236\u6267\u884c\u76f8\u540c\u8f6f\u4ef6\u5305\u7248\u672c\uff0c\u907f\u514d\u7248\u672c\u51b2\u7a81\u3002\u81ea\u52a8\u5316\u4f9d\u8d56\u9879\u7ba1\u7406\uff1a\u63d0\u4f9b cli \u547d\u4ee4\uff0c\u7528\u4e8e\u5b89\u88c5\u3001\u66f4\u65b0\u548c\u5220\u9664\u4f9d\u8d56\u9879\u3002\u72ec\u7acb\u4e8e\u6846\u67b6\uff1a\u53ef\u5728\u4efb\u4f55 php \u4ee3\u7801\u5e93\u4e2d\u4f7f\u7528\u3002 Composer \u7684\u4f5c\u7528 Composer \u662f PHP \u8bed\u8a00\u7684\u4e00\u4e2a\u4f9d\u8d56\u7ba1\u7406\u5de5\u5177\u3002\u5b83\u7528\u4e8e\u7ba1\u7406 PHP \u4ee3\u7801\u5e93\u4e2d\u6240\u4f9d\u8d56\u7684\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u5305\u3002Composer \u7684\u4e3b\u8981\u529f\u80fd\u5305\u62ec\uff1a \u5b89\u88c5\u548c\u7ba1\u7406\u4f9d\u8d56\u9879\uff1aComposer \u6839\u636e\u4ee3\u7801\u5e93\u4e2d\u6307\u5b9a\u7684\u8981\u6c42\u81ea\u52a8\u5b89\u88c5\u548c\u66f4\u65b0\u6240\u9700\u7684\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u5305\u3002 \u4f9d\u8d56\u9879\u89e3\u6790\uff1aComposer \u9012\u5f52\u89e3\u6790\u4f9d\u8d56\u5173\u7cfb\uff0c\u786e\u4fdd\u6240\u6709\u5fc5\u9700\u7684\u8f6f\u4ef6\u5305\u90fd\u5df2\u5b89\u88c5\uff0c\u4e14\u7248\u672c\u517c\u5bb9\u3002 \u7edf\u4e00\u4f9d\u8d56\u9879\u7248\u672c\uff1aComposer \u5728\u4e0d\u540c\u7684\u9879\u76ee\u95f4\u5f3a\u5236\u6267\u884c\u76f8\u540c\u7684\u8f6f\u4ef6\u5305\u7248\u672c\uff0c\u907f\u514d\u56e0\u7248\u672c\u51b2\u7a81\u5bfc\u81f4\u95ee\u9898\u3002 \u81ea\u52a8\u5316\u4f9d\u8d56\u9879\u7ba1\u7406\uff1aComposer \u63d0\u4f9b\u547d\u4ee4\u884c\u754c\u9762\uff08CLI\uff09\u547d\u4ee4\uff0c\u7528\u4e8e\u7ba1\u7406\u4f9d\u8d56\u9879\uff0c\u5982\u5b89\u88c5\u3001\u66f4\u65b0\u548c\u5220\u9664\u3002 \u72ec\u7acb\u4e8e\u6846\u67b6\uff1aComposer \u4e0e\u7279\u5b9a\u6846\u67b6\u65e0\u5173\uff0c\u53ef\u5728\u4efb\u4f55 PHP \u4ee3\u7801\u5e93\u4e2d\u4f7f\u7528\u3002 Composer \u7684\u597d\u5904 \u4f7f\u7528 Composer \u63d0\u4f9b\u4e86\u8bb8\u591a\u597d\u5904\uff0c\u5305\u62ec\uff1a \u63d0\u9ad8\u5f00\u53d1\u6548\u7387\uff1a\u81ea\u52a8\u5316\u4f9d\u8d56\u9879\u7ba1\u7406\u53ef\u8282\u7701\u5f00\u53d1\u4eba\u5458\u7684\u65f6\u95f4\u548c\u7cbe\u529b\u3002 \u51cf\u5c11\u7248\u672c\u51b2\u7a81\uff1a\u901a\u8fc7\u5f3a\u5236\u6267\u884c\u7edf\u4e00\u7684\u4f9d\u8d56\u9879\u7248\u672c\uff0cComposer \u51cf\u5c11\u4e86\u7531\u4e8e\u7248\u672c\u4e0d\u517c\u5bb9\u800c\u5bfc\u81f4\u7684\u95ee\u9898\u3002 \u6539\u5584\u4ee3\u7801\u7ef4\u62a4\uff1aComposer \u7ef4\u62a4\u4e00\u4e2a\u96c6\u4e2d\u5f0f\u7684\u6587\u4ef6\uff08 .json\uff09\uff0c\u5176\u4e2d\u5217\u51fa\u4e86\u6240\u6709\u4f9d\u8d56\u9879\u548c\u7248\u672c\uff0c\u4fbf\u4e8e\u7ef4\u62a4\u548c\u66f4\u65b0\u4ee3\u7801\u5e93\u3002 \u589e\u5f3a\u56e2\u961f\u534f\u4f5c\uff1aComposer \u7248\u672c\u9501\u5b9a\u4f9d\u8d56\u9879\uff0c\u786e\u4fdd\u56e2\u961f\u6210\u5458\u4f7f\u7528\u76f8\u540c\u7684\u4f9d\u8d56\u9879\u7248\u672c\uff0c\u4ece\u800c\u6539\u5584\u534f\u4f5c\u3002 \u6269\u5927\u4ee3\u7801\u5e93\u7684\u53ef\u91cd\u7528\u6027\uff1aComposer \u53ef\u5c06\u4f9d\u8d56\u9879\u96c6\u4e2d\u5728\u4e00\u4e2a\u5730\u65b9\uff0c\u4f7f\u4ee3\u7801\u5e93\u66f4\u5bb9\u6613\u91cd\u7528\u3002 \u4ee5\u4e0a\u5c31\u662f\u6709\u4ec0\u4e48\u7528\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-21246","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=21246"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21246\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}