去评论
dz插件网

如何启用Discuz!Q的composer

婷姐
2024/05/21 12:10:12
闃叉墜璐憋細
鍏堟暣涓浠戒綘鐨 dzq 椤圭洰鏂囦欢澶癸紝闃叉鍑洪棶棰樹簡涔嬪悗鏁版嵁鏃犳硶杩樺師

鍏堣涓涓嬫垜鐨勪簩寮娴佺▼
鎴戠洿鎺ヤ粠鏈嶅姟鍣ㄦ妸鎵鏈変唬鐮佹墦鍖呬笅杞戒笅鏉ワ紝鐒跺悗鍦ㄦ湰鍦板垱寤虹殑 git 浠撳簱

.gitignore 鏂囦欢
鏁翠釜浠撳簱鎷変笅鏉ヤ箣鍚庯紝鍒繕浜嗗垱寤轰竴涓.gitignore 鏂囦欢锛
  1. # /framework/public/vendor/composer.lock/.idea/config/config.php/node_modules.php_cs.cache/public/s9e.js/public/storage/storage/install.lock/public/docs/public/api-docs/public/manual-h5/public/manual-admin/plugin/CustomIfram2
/frame
杩欎釜瑕佹敞閲婃帀锛堜笉蹇界暐锛夛紝鍚庤竟鎴戜細鍛婅瘔浣犲共浠涔堢敤

/public
鍓嶇浠g爜锛岃繖閲屾斁鐨勬槸浜х墿锛屼笉鏄墠绔簮鐮侊紝鐩存帴蹇界暐

/vendor
鏁翠釜 dzq 椤圭洰鎵闇瑕佺殑锛屽凡缁忎笅杞藉ソ鐨勬墍鏈 composer 渚濊禆锛屽洜涓哄悗杈瑰挶浠彲浠ヨ嚜宸卞鐞 composer 鍖呬簡锛屾墍浠ヨ繖閲岀洿鎺ュ拷鐣ユ帀

/config/config.php
閰嶇疆鏂囦欢锛岃繖閲屽洜涓洪渶瑕佷娇鐢ㄥ紑鍙戠増鐨勬暟鎹簱杩炴帴鍦板潃锛屾墍浠ュ拷鐣

鍓╀笅鐨勫唴瀹逛篃鏄洿鎺ュ拷鐣ュ嵆鍙紝鎴戜笉鍐嶅瑙i噴鍏朵粬鐨勭洰褰曠殑浣滅敤浜

淇 composer.json
鏈鍚庝竴鐗 DZQ 宸茬粡杩囧幓涓ゅ勾浜嗭紝澶ч儴鍒 composer 鍖呭凡缁忔湁浜嗘洿鏂扮殑鐗堟湰锛屼絾鏄儴鍒嗗寘鍙兘涓嶅吋瀹圭洰鍓嶇殑 DZQ3.0 鍚庣锛屾墍浠ユ殏鏃跺厛閿佸畾鐩墠宸叉湁鐨勫寘鐨勭増鏈

require 瀛楁锛
鐩存帴鏀规垚鎴戣繖鏍锋棦鍙
  1. "require": {        "php": "^7.2.5",        "ext-json": "*",        "ext-pdo": "*",        "discuz/core": "dev-3.0-dev",        "doctrine/dbal": "2.13.2",        "endroid/qr-code": "3.9.6",        "ezyang/htmlpurifier": "v4.13.0",        "league/omnipay": "v3.0.2",        "lokielse/omnipay-wechatpay": "v3.0.11",        "overtrue/wechat": "4.4.2",        "qcloud/vod-sdk-v5": "v2.4.4",        "qcloud_sts/qcloud-sts-sdk": "3.0.6",        "s9e/text-formatter": "2.9.3",        "zircote/swagger-php": "^3.2"    },
require-dev 瀛楁
鏀规垚杩欐牱锛
  1. "require-dev": {        "friendsofphp/php-cs-fixer": "v2.19.0",        "symfony/var-dumper": "v4.4.26"    },
杩欐牱鏀硅繖涓や釜瀛楁鐨勪綔鐢紝鏄洿鎺ョ‖閿佸畾 composer 鍖呯殑鐗堟湰

淇 dzq 涓绘鏋讹紙閲嶈锛
寮濮嬫甯镐娇鐢 composer
杩涘叆浣犵殑 DZQ 鏍圭洰褰曪紝寮鍚 cmd 缁堢锛岀劧鍚庤緭鍏 composer install锛屽鏋滅敓鎴愪簡涓涓柊鐨 composer.json.lock銆傚垯 composer 灏卞彲浠ユ甯镐娇鐢ㄤ簡