aacotroneo / laravel-saml2

A Laravel 5 package for Saml2 integration as a SP (service provider) based on the simple OneLogin toolkit
MIT License
567 stars 238 forks source link

Composer not pulling latest versions (2.0.0) #191

Closed vishalmaniya closed 5 years ago

vishalmaniya commented 5 years ago

I cannot get Composer to pull the latest version 2.0.0

xnasa commented 5 years ago

Currently version 2.0.0 does not show as available through composer. composer show "aacotroneo/laravel-saml2" --all But there may be a reason for that, since I've run into other issues with it (not addressed here).

It is a bit awkward to have composer pull version 1 but the instructions are for version 2.

To pull it in directly though composer you can add the version zip file as a repository by adding the text to you composer.json file before the laravel info. This way when 2.0.1 comes out it will be pulled from composer and composer will stop using this added repository which indicate is for 2.0.0 only.

    "repositories": [
    {
        "type": "package",
        "package": {
            "name": "aacotroneo/laravel-saml2",
            "description": "A Laravel package for Saml2 integration as a SP (service provider) for multiple IdPs, based on OneLogin toolkit which is much more lightweight than simplesamlphp.",
            "keywords": ["laravel","saml", "saml2", "onelogin"],
            "homepage": "https://github.com/aacotroneo/laravel-saml2",
            "dist": {
                "type": "zip",
                "url": "https://github.com/aacotroneo/laravel-saml2/archive/2.0.0.zip",
                "reference": "2.0.0"
            },
            "license": "MIT",
            "version": "2.0.0",
            "authors": [
                {
                    "name": "aacotroneo",
                    "email": "aacotroneo@gmail.com"
                },
                {
                    "name": "Niraj Patkar",
                    "email": "niraj@alphonso.in"
                }
            ],
            "require": {
                "php": ">=5.4.0",
                "ext-openssl": "*",
                "illuminate/support": ">=5.0.0",
                "onelogin/php-saml": "^3.0.0"
            },
            "require-dev": {
                "mockery/mockery": "0.9.*",
                "phpunit/phpunit": "~4.0"
            },
            "autoload": {
                "psr-0": {
                    "Aacotroneo\\Saml2\\": "src/"
                }
            },
            "extra": {
                "laravel": {
                    "providers": [
                        "Aacotroneo\\Saml2\\Saml2ServiceProvider"
                    ]
                }
            },
            "minimum-stability": "stable"
        }
    }],

This is mostly the composer.json file from the repository, but I added the dist: information to point to the archived zip. I know this my be a bit 'extra' but you'll be able to get it.

Just remember I've found problems in this version so you most likely will as well.

nstaff commented 5 years ago

@aacotroneo Is this something you need to update in your packagist settings?

aacotroneo commented 5 years ago

thanks for reporting @nstaff ! It should've worked automatically. I added a fake commit/release and now it seems to be there... some missed github hook!

nstaff commented 5 years ago

@aacotroneo Awesome! Thank you for resolving it! I can pull the right version from composer now. Just tested this from a new machine in a new project. Recommend resolving the issue as fixed.