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我只需要在這一點上的一個小方向:)