WWW.lllT.neT

下边由composer实例教程频道给各位介绍一下PHP Composer如何载入当地拓展包,期待对必须的小伙伴有些协助!

文件目录构造:

PHP Composer如何载入当地拓展包

 新项目下的 HttpServerFrame/composer.json

{
  "name": "xxx/http-server-demo",
  "authors": [
    {
      "name": "xxx",
      "email": "xxx@xxx.com"
    }
  ],
  "autoload": {
    "psr-4": {
      "App\": "app/"
    }
  },
  "repositories": {
    "0": {
      "type": "path",
      "url": "../packages/*/*",
      "options": {
        "symlink": true  //软链方法
      }
    }
  },
  "require": {
    "xxx/http-server-frame": "dev-release",
    "xxx/http-test": "dev-release"
  }
}


关心这方面编码

"repositories": {
    "0": {
      "type": "path",
      "url": "../packages/*/*", //从 packages 文件目录下的*/* 组装此文件目录下务必要有composer.json
      "options": {
        "symlink": true  //软链方法
      }
    }
  },

立即composer update 就可以导进,实际效果如下所示:

PHP Composer如何载入当地拓展包

以上便是PHP Composer如何载入当地拓展包的详尽具体内容,大量请关心自学java网其他相关文章!

WWW.lllT.neT

声明:有的资源来自网络转载,版权归原作者所有,如有侵犯到您的权益请联系邮箱:our333@126.com我们将配合处理!

原文地址:PHP Composer如何载入当地拓展包发布于2021-12-12 16:09:01