I've recently developed a library to easy the process of logging information to a separate server that I'm hosting. The goal is to use the library in multiple of my projects but I can't find a way to submit it to packagist.
When I try to submit my library which is publicly available on gitlab I'm getting the following error:
The package name was not found in the composer.json, make sure there is a name present.
While my composer json looks like this, where there clearly is a name in the composer.json.
{
"name": "crispcode/laravel-influx-db",
"description": "Logging to influx db for Laravel",
"type": "library",
"license": "MIT",
"authors": [],
"autoload": {
"psr-4": {
"CrispCode\\LaravelInfluxDB\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"CrispCode\\LaravelInfluxDB\\Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"providers": [
"CrispCode\\LaravelInfluxDB\\InfluxDBServiceProvider"
]
}
},
"require": {
"php": "^8.2",
"influxdata/influxdb-client-php": "^3.2"
},
"require-dev": {
"orchestra/testbench": "^7.0",
"phpunit/phpunit": "^9.5",
"nunomaduro/larastan": "^2.4",
"guzzlehttp/guzzle": "^7.5"
},
"config": {
"allow-plugins": {
"php-http/discovery": true
}
}
}
I made sure the composer.json
is in the root file of my project, as was the solution solution for a similar problem.
My directory structure is like this
- src/
- tests/
- composer.json
- readme.md