[英]Naming conventions when creating a PHP composer package
I am creating a package that is loaded by PHP composer. 我正在创建一个由PHP编写器加载的包。 I was planning to name the package just as my name shows along with the name of the class: eComEvo/TestableAPI
我打算像我的名字一样命名包,并eComEvo/TestableAPI
该类的名称: eComEvo/TestableAPI
However, before I do so, could the use of capitals the way I have them create an issue with autoloading through composer? 但是,在我这样做之前,使用大写字母的方式是否可以通过作曲家自动加载产生问题?
I think Composer suggests using only lowercase letters for the names. 我认为Composer建议只使用小写字母作为名称。 This might be related to the several file systems being possibly case-insensitive or not. 这可能与几个文件系统可能不区分大小写有关。
If you look at packagist.org, you only see lower case package names. 如果你看一下packagist.org,你只看到小写包名。
all lowercase and dashes for word separation. 所有小写和破折号用于单词分隔。
See the answer on getcomposer.org 请参阅getcomposer.org上的答案
Abstract: 抽象:
If you don't know what to use as a vendor name, your GitHub username is usually a good bet. 如果您不知道要使用什么作为供应商名称,您的GitHub用户名通常是一个不错的选择。 While package names are case insensitive, the convention is all lowercase and dashes for word separation. 虽然包名称不区分大小写,但约定都是小写的,并且用于单词分隔。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.