lahaxearnaud / laravel-u2f

Laravel U2F support
MIT License
53 stars 22 forks source link

Cannot install on laravel 8 #37

Open TomKingDev opened 3 years ago

TomKingDev commented 3 years ago

Is there a way of this package being updated to work with laravel 8?

I am currently getting this error when trying to install with composer:

- lahaxearnaud/laravel-u2f[1.6.0, ..., 1.6.2] require laravel/framework ^6.0 -> found laravel/framework[v6.0.0, ..., 6.x-dev] but it conflicts with your root composer.json require (^8.12).

lahaxearnaud commented 3 years ago

Hello.

It will be great to make the support to laravel 7 and 8. Currently I don't have much time to spend on it but if you want to make a pull request I will be very happy to review and merge it.

Arnaud

TomKingDev commented 3 years ago

Hi Arnaud

Thank you for your response.

Will more need changing than simply the version numbers in the composer.json? I have never actually contributed to a package before so would be keen to understand the process

lahaxearnaud commented 3 years ago

I didn't read the full changelog of laravel 7 and laravel 8. Perhaps the migration is seamless (just a bump in the composer.json) perhaps not.

TomKingDev commented 3 years ago

Would there be a way for me to try the package without the laravel 6 dependency and then assist with any fixes required?

Tuurlijk commented 2 years ago

@tomking89

Create a local repository for testing / development

Add a section like this to your repositories in composer.json:

        "local": {
            "type": "path",
            "url": "croptesting/*",
            "only": ["lahaxearnaud/laravel-u2f"]
        }

image

Create croptesting and clone laravel-u2f into it

mkdir croptesting
cd croptesting
git clone https://github.com/lahaxearnaud/laravel-u2f.git

modify the composer.json

Replace all the ^6.0 bits with ^8.0 in the composer.json in the croptesting/laravel-u2f dir.

require the local package

/v/w/html  composer require lahaxearnaud/laravel-u2f "dev-master"                                                                                                                             ./composer.json has been updated
Running composer update lahaxearnaud/laravel-u2f
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
  - Locking lahaxearnaud/laravel-u2f (dev-master)
  - Locking yubico/u2flib-server (1.0.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Downloading yubico/u2flib-server (1.0.2)
  - Installing yubico/u2flib-server (1.0.2): Extracting archive
  - Installing lahaxearnaud/laravel-u2f (dev-master): Symlinking from croptesting/laravel-u2f
Generating autoload files
. . .

see what breaks

See what breaks and submit a patch.