Home > Backend Development > PHP Tutorial > composer 自建package

composer 自建package

WBOY
Release: 2016-06-06 20:35:09
Original
1050 people have browsed it

网上搜了一大堆,但是有疑问:

通过 composer init 后,
并不会将文件纳入 psr4 或者psr0 自动加载中

我想问下你们难道是自己写进去的么?而不是composer自己帮你加载进去的

如下面这一段

<code>    "autoload": {
    "psr-4": {
        "Ford\\Escape\\": "src/Ford/Escape",
        "Ford\\Fusion\\": "src/Ford/Fusion",
        "Ford\\Focus\\": "src/Ford/Focus",
        "Ford\\Fiesta\\": "src/Ford/Fiesta"
    }
   } 
</code>
Copy after login
Copy after login

回复内容:

网上搜了一大堆,但是有疑问:

通过 composer init 后,
并不会将文件纳入 psr4 或者psr0 自动加载中

我想问下你们难道是自己写进去的么?而不是composer自己帮你加载进去的

如下面这一段

<code>    "autoload": {
    "psr-4": {
        "Ford\\Escape\\": "src/Ford/Escape",
        "Ford\\Fusion\\": "src/Ford/Fusion",
        "Ford\\Focus\\": "src/Ford/Focus",
        "Ford\\Fiesta\\": "src/Ford/Fiesta"
    }
   } 
</code>
Copy after login
Copy after login

试下不就知道了!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template