0

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
MikeSli
  • 927
  • 2
  • 14
  • 32
  • You've definitely pushed the updated composer.json to your repo? – Dale Feb 24 '23 at 12:10
  • Do you need to create a release? I don't see one in that repo, I have to create a release when my code is on github, not sure if it's the same with gitlab. – Dale Feb 24 '23 at 12:17
  • Thanks for reaching out, I made sure the composer json is there. I just tried creating a release unfortunately that did not help – MikeSli Feb 25 '23 at 11:47

0 Answers0