Why using PSR4 autoload doesn't add any classes into classmap/namespaces file?

早过忘川 提交于 2019-12-08 15:44:43

As per @stof comment at GitHub, Composer doesn't support loading of composer.json file from the repositories of the type package. The goal of a package type is to download projects which are not supporting Composer. Therefore composer.json file is never read.

Solution is to use vcs type instead. Here is the composer.json which should work:

{
  "require": {
    "queueit/knownuserv3": "dev-master"
  },
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/queueit/KnownUser.V3.PHP"
    }
  ]
}

Otherwise "you would have to copy the project metadata entirely in your package repository, and this is harder to maintain".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!