#### 1. 情景再現(xiàn) ---- 執(zhí)行 composer install 安裝擴展包時遇到錯誤: `Your requirements could not be resolved to an installable set of packages` 這是因為當前PHP版本不匹配composer.json要求的版本,安裝擴展包時設(shè)置忽略版本匹配即可 ![](https://img.itqaq.com/art/content/0ddf93d670d0bd89890b5acdaba9797c.png) #### 2. 解決方案 ---- 使用參數(shù):`--ignore-platform-reqs` 設(shè)置忽略版本匹配 ``` composer install --ignore-platform-reqs composer update --ignore-platform-reqs ```