jjcodes78 / mikrotikapi

[WIP] Mikrotik API Wrapper for Laravel
13 stars 2 forks source link

Can't install. #1

Closed jorgeepena closed 5 years ago

jorgeepena commented 5 years ago

Hello! Using composer require just send a bunch of errors. Is there a way to fix this?

`composer require jjsquady/mikrotikapi Using version ^0.4.0 for jjsquady/mikrotikapi ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 3 installs, 0 updates, 0 removals

Installation failed, reverting ./composer.json to its original content.

[RuntimeException]
Failed to execute git checkout 'ad37a6df73f2f686922a4f4d9ae7674b6f5c5bbf' -

paclw-cory commented 5 years ago

Same problem here trying to install on 5.8.

Anything I can do to help?

jjcodes78 commented 5 years ago

Hi @Eggotron ! Sorry for that, I ve updated the packagist registry. I think that should work now.

jjcodes78 commented 5 years ago

composer require jjsquady/mikrotikapi:0.1 ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 3 installs, 0 updates, 0 removals

minimum-stability: dev

I'm working on a simplified version... without pear2/net_routeros complexity. I ll publish a new branch with this version using the RouterOS php class.

paclw-cory commented 5 years ago

Still getting this today:

composer require jjsquady/mikrotikapi

Using version ^0.1.0 for jjsquady/mikrotikapi ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 3 installs, 0 updates, 0 removals

In ProviderRepository.php line 208:

Class 'jjsquady\MikrotikApi\MikrotikServiceProvider::class' not found

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

jjcodes78 commented 5 years ago

Hi!

I made a mistake leaving ::class in "extra" -> "provders" in composer.json :(

WRONG

"extra": {
    "laravel": {
      "providers": [
        "jjsquady\\MikrotikApi\\MikrotikServiceProvider::class"
      ],
      "aliases": {
        "Mikrotik": "jjsquady\\MikrotikApi\\Facades\\MikrotikFacade::class"
      }
    }
  }

RIGHT

"extra": {
    "laravel": {
      "providers": [
        "jjsquady\\MikrotikApi\\MikrotikServiceProvider"
      ],
      "aliases": {
        "Mikrotik": "jjsquady\\MikrotikApi\\Facades\\MikrotikFacade"
      }
    }
  }

To avoid the error remove ::class in vendor/composer/installed.json and bootstrap/cache/packages.php files.

After that... the php artisan package:discover works.

I'll fix this in a next commit.