Question

I'm the author of Restler framework, now trying to use properly named tags for package versioning.

I'm using the following composer.json and named my tags as advised in https://getcomposer.org/doc/02-libraries.md#tags which you can see at https://github.com/Luracast/Restler/releases

But packagist does not list the version packages!

{
    "name": "luracast/restler",
    "type": "library",
    "description": "Restler is a simple and effective multi-format Web API Server framework written in PHP. Just deal with your business logic in php, Restler will take care of the REST!",
    "keywords": ["server", "api", "framework", "REST"],
    "homepage": "http://luracast.com/products/restler/",
    "license": "LGPL-2.1",
    "authors": [
        {
            "name": "Luracast",
            "email": "arul@luracast.com"
        },
        {
            "name": "Nick nickl- Lombard",
            "email": "github@jigsoft.co.za"
        }
    ],
    "require": {
        "php": ">=5.3.3"
    },
    "require-dev": {
        "luracast/explorer": "*",
        "guzzle/guzzle": "~3.1.1",
        "behat/behat": "2.4.*@stable",
        "rodneyrehm/plist": "dev-master",
        "zendframework/zendamf": "dev-master",
        "symfony/yaml": "*",
        "mustache/mustache": "dev-master",
        "twig/twig": "v1.13.0",
        "bshaffer/oauth2-server-php": "v1.0"
    },
    "suggest": {
        "luracast/explorer": "Restler's very own api explorer (see require-dev for details)",
        "guzzle/guzzle": "RESTful api HTTP client framework (see require-dev for details)",
        "behat/behat": "Behaviour driven development testing framework (see require-dev for details)",
        "rodneyrehm/plist": "Restler supports tho Apple plist xml format (see require-dev for details)",
        "zendframework/zendamf": "Support for the amf document format  (see require-dev for details)",
        "symfony/yaml": "Restler can produce content in yaml format as well (see require-dev for details)",
        "twig/twig": "Restler can render HtmlView using twig templates (see require-dev for details)",
        "mustache/mustache": "Restler can render HtmlView using mustache/handlebar templates (see require-dev for details)",
        "bshaffer/oauth2-server-php": "Restler can provide OAuth2 authentication using this library (see require-dev for details)"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/zendframework/ZendAmf.git"
        },
        {
            "type": "package",
            "package": {
                "name": "luracast/explorer",
                "version": "v3.0.0",
                "dist": {
                    "type": "zip",
                    "url": "https://github.com/Luracast/Restler-API-Explorer/zipball/v3.0.0"
                }
            }
        }
    ],
    "autoload": {
        "psr-0": {
            "Luracast\\Restler": "vendor/"
        }
    },
    "minimum-stability": "dev",
    "extra": {
        "branch-alias": {
            "v3": "3.0.x-dev"
        }
    }
}

I can see projects like symfony/symfony were using similar composer.json and similar branch names but they show just fine on packagist

Could not figure out any solution! Any help is much appreciated

Was it helpful?

Solution

There is an easy way to debug this, you create a composer.json containing your repository, i.e.:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/Luracast/Restler"
        }
    ]
}

Then you run composer show -v luracast/restler, the -v will display details when parsing the git repo. The output of this command is:

Reading composer.json of luracast/restler (3.0.0-RC1)
Skipped tag 3.0.0-RC1, tag (3.0.0.0-RC1) does not match version (3.0.0.0) in composer.json
Reading composer.json of luracast/restler (3.0.0)
Importing tag 3.0.0 (3.0.0.0)
Reading composer.json of luracast/restler (2.2.0)
Skipped tag 2.2.0, no composer file
Reading composer.json of luracast/restler (1.0.20)
Skipped tag 1.0.20, no composer file
Reading composer.json of luracast/restler (features/AOP)
Importing branch features/AOP (dev-features/AOP)
Reading composer.json of luracast/restler (features/forms)
Importing branch features/forms (dev-features/forms)
Reading composer.json of luracast/restler (features/html)
Importing branch features/html (dev-features/html)
Reading composer.json of luracast/restler (features/oauth)
Importing branch features/oauth (dev-features/oauth)
Reading composer.json of luracast/restler (features/router)
Importing branch features/router (dev-features/router)
Reading composer.json of luracast/restler (features/swagger1.2)
Importing branch features/swagger1.2 (dev-features/swagger1.2)
Reading composer.json of luracast/restler (master)
Importing branch master (dev-master)
Reading composer.json of luracast/restler (v1)
Skipped branch v1, no composer file
Reading composer.json of luracast/restler (v2)
Skipped branch v2, no composer file
Reading composer.json of luracast/restler (v3)
Importing branch v3 (3.x-dev)

 

name     : luracast/restler
descrip. : Restler is a simple and effective multi-format Web API Server framework written in PHP. Just deal with your business logic in php, Restler will take care of the REST!
keywords : server, api, framework, REST
versions : dev-master, 3.x-dev, v3.0.0, dev-features/swagger1.2, dev-features/AOP, dev-features/forms, dev-features/oauth, dev-features/html, dev-features/router

As you see, tags have been skipped because they are missing a composer.json or the version didn't match (I see you removed the version in the master branch, that's the right thing to do). Only one tag (3.0.0) was imported successfully and shows up in the second bit of output in the list of versions.

So in other words, all is well and new tags you create from the master branch should show up without problems on packagist, along with the 3.0.0 which is already there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top