0
我刚刚将我的第一个composer.json包添加到了我创建的API。创建我的第一个composer.json文件
https://github.com/elvanto/api-php
这是我的文件的副本
{
"name": "elvanto/api-php",
"type": "library",
"description": "API PHP Library for elvanto church management software.",
"keywords": ["elvanto", "api"],
"homepage": "https://github.com/elvanto/api-php/",
"license": "MIT",
"authors": [
{
"name": "Ben Sinclair",
"homepage": "http://elvanto.com",
"role": "Developer"
}
],
"require": {
"php": ">=5.3.0"
},
"autoload": {
"classmap": [
"."
]
}
}
当我试图用Composer来安装包我
终端-$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
Nothing to install or update
Generating autoload files
在我的供应商/文件夹中得到这个,它加载自动加载文件,但不包括我的班级文件:
autoload.php
composer/autoload_classmap.php
composer/autoload_namespaces.php
composer/autoload_real.php
composer/ClassLoader.php
我做错了什么?我试图改变composer.json文件到以下(这是我见过的其他包做),但我得到了一个完全不同的错误:
"autoload": {
"classmap": [
"elvanto_API.php"
]
}
错误是:
[RuntimeException]
Could not scan for classes inside "elvanto_API.php" which does not appear to be a file nor a folder
我想我'm close我只需要在这一点上的一个小方向:)