Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Naming conventions when creating a PHP composer package

I am creating a package that is loaded by PHP composer. I was planning to name the package just as my name shows along with the name of the class: eComEvo/TestableAPI

However, before I do so, could the use of capitals the way I have them create an issue with autoloading through composer?

like image 672
eComEvo Avatar asked Dec 15 '22 21:12

eComEvo


2 Answers

I think Composer suggests using only lowercase letters for the names. 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.

like image 181
Sven Avatar answered Jan 11 '23 14:01

Sven


all lowercase and dashes for word separation.

See the answer on getcomposer.org

Abstract:

If you don't know what to use as a vendor name, your GitHub username is usually a good bet. While package names are case insensitive, the convention is all lowercase and dashes for word separation.

like image 37
Bernard de Rubinat Avatar answered Jan 11 '23 14:01

Bernard de Rubinat