ministryofjustice / jwt-laminas-auth

Module to provide JWT token support to Laminas framework MVC applications
Other
7 stars 1 forks source link

Cannot install jwt-laminas-auth module on laminas-api-tools/api-tools-skeleton #2

Open mcmidget opened 4 years ago

mcmidget commented 4 years ago

Hi team, I would like to give a try to jwt-laminas-auth module but cannot install it on top of an up-to-date laminas-api-tools/api-tools-skeleton project.

Am I missing something?

$ composer -v require ministryofjustice/jwt-laminas-auth

In InitCommand.php line 799:

  [InvalidArgumentException]                                                                                                        
  Could not find a matching version of package ministryofjustice/jwt-laminas-auth. Check the package spelling, your version constr  
  aint and that the package is available in a stability which matches your minimum-stability (stable).                              

Exception trace:
  at /usr/share/php/Composer/Command/InitCommand.php:799
 Composer\Command\InitCommand->findBestVersionAndNameForPackage() at /usr/share/php/Composer/Command/InitCommand.php:416
 Composer\Command\InitCommand->determineRequirements() at /usr/share/php/Composer/Command/RequireCommand.php:163
 Composer\Command\RequireCommand->execute() at /usr/share/php/Symfony/Component/Console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /usr/share/php/Symfony/Component/Console/Application.php:1000
 Symfony\Component\Console\Application->doRunCommand() at /usr/share/php/Symfony/Component/Console/Application.php:271
 Symfony\Component\Console\Application->doRun() at /usr/share/php/Composer/Console/Application.php:281
 Composer\Console\Application->doRun() at /usr/share/php/Symfony/Component/Console/Application.php:147
 Symfony\Component\Console\Application->run() at /usr/share/php/Composer/Console/Application.php:113
 Composer\Console\Application->run() at /usr/bin/composer:62

require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>...]

composer.json file (for laminas-api-tools/api-tools-skeleton) looks like this:

{
    "name": "laminas-api-tools/api-tools-skeleton",
    "description": "Skeleton Application for Laminas API Tools",
    "type": "project",
    "license": "BSD-3-Clause",
    "keywords": [
        "laminas",
        "api-tools",
        "api",
        "framework"
    ],
    "homepage": "https://api-tools.getlaminas.org",
    "support": {
        "docs": "https://api-tools.getlaminas.org/documentation",
        "issues": "https://github.com/laminas-api-tools/api-tools-skeleton/issues",
        "source": "https://github.com/laminas-api-tools/api-tools-skeleton",
        "rss": "https://github.com/laminas-api-tools/api-tools-skeleton/releases.atom",
        "chat": "https://laminas.dev/chat",
        "forum": "https://discourse.laminas.dev"
    },
    "config": {
        "process-timeout": 5000,
        "sort-packages": true
    },
    "extra": {
        "branch-alias": {
            "dev-master": "1.5.x-dev",
            "dev-develop": "1.6.x-dev"
        }
    },
    "require": {
        "php": "^5.6 || ^7.0",
        "laminas-api-tools/api-tools": "^1.4",
        "laminas-api-tools/api-tools-documentation": "^1.3",
        "laminas-api-tools/api-tools-documentation-swagger": "^1.3",
        "laminas-api-tools/statuslib-example": "^1.2",
        "laminas/laminas-component-installer": "^1.1.1 || ^2.1.1",
        "laminas/laminas-development-mode": "^3.2",
        "laminas/laminas-zendframework-bridge": "^1.0"
    },
    "require-dev": {
        "laminas-api-tools/api-tools-admin": "^1.6",
        "laminas-api-tools/api-tools-asset-manager": "^1.2",
        "laminas/laminas-composer-autoloading": "^1.1.1 || ^2.1",
        "laminas/laminas-developer-tools": "^1.2.1",
        "laminas/laminas-test": "^2.6.1 || ^3.2",
        "roave/security-advisories": "dev-master",
        "zfcampus/zf-deploy": "^1.3"
    },
    "suggest": {
        "laminas-api-tools/api-tools-doctrine": "laminas-api-tools/api-tools-doctrine ^2.2 to create Doctrine-Connected REST services",
        "laminas-api-tools/api-tools-http-cache": "laminas-api-tools/api-tools-http-cache ^1.4 to add HTTP caching to your API",
        "zfr/zfr-cors": "zfr/zfr-cors ^1.5 to add CORS support to your API"
    },
    "autoload": {
        "psr-4": {
            "Application\\": "module/Application/src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "ApplicationTest\\": "module/Application/test/"
        },
        "files": [
            "src/ApiTools/constants.php"
        ]
    },
    "scripts": {
        "cs-check": "phpcs",
        "cs-fix": "phpcbf",
        "development-disable": "laminas-development-mode disable",
        "development-enable": "laminas-development-mode enable",
        "development-status": "laminas-development-mode status",
        "post-create-project-cmd": [
            "@development-enable"
        ],
        "serve": "php -S 0.0.0.0:8080 -t public/",
        "test": "phpunit"
    },
    "replace": {
        "zfcampus/zf-apigility-skeleton": "1.5.2p1"
    }
}
ramchale commented 4 years ago

Sorry. Missed this @mcmidget did you ever resolve this issue, and is it something you still want to look at?

ramchale commented 4 years ago

At the moment you'll need to pull the package from the repo by adding a repositories block to the composer.json

"repositories": [
    {
      "type": "vcs",
      "url": "git@github.com:ministryofjustice/jwt-laminas-auth.git"
    }
  ],
mcmidget commented 4 years ago

OK, I'll try to install it that way and let you know. Thanks.