vanilophp / framework

The truly Laravel E-commerce Framework
https://vanilo.io
MIT License
810 stars 102 forks source link

Installing problems with ConcordServiceProvider #39

Closed maksakoviliya closed 5 years ago

maksakoviliya commented 5 years ago

I've tried to install Vanilo, but there is an error Declaration of Konekt\Menu\ItemCollection::add(Konekt\Menu\Item $item) should be compatible with Illuminate\Support\Collection::add($item)

maksakoviliya commented 5 years ago

I've tried to install Vanilo, but there is an error Declaration of Konekt\Menu\ItemCollection::add(Konekt\Menu\Item $item) should be compatible with Illuminate\Support\Collection::add($item)

Fixed it by changing vendor/konekt/menu/src/ItemCollection.php public function add(Item $item) -> public function add($item)

fulopattila122 commented 5 years ago

Well vendor must never be changed so this will not continue to work as soon as you install this somewhere else eg. a webserver.

Do you have any application code that registers menu items? What php version do you use?

kkrieger85 commented 5 years ago

Same for me.

Here my composer.lock: composer.lock.txt

kkrieger85 commented 5 years ago

@maksakoviliya Could you please paste your composer.json. Especially require and require-dev

kkrieger85 commented 5 years ago
    "require": {
        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.8.*",
        "laravel/tinker": "^1.0",
        "vanilo/framework": "0.5"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^2.0",
        "phpunit/phpunit": "^7.5"
    },
kkrieger85 commented 5 years ago

Uses:

"name": "konekt/menu",
            "version": "1.2.0",
            "source": {
                "type": "git",
                "url": "https://github.com/artkonekt/menu.git",
                "reference": "a8559927d7738742edcd8a225182767432b868f3"
            },
K4q4m3 commented 5 years ago

Check this issue #36

kkrieger85 commented 5 years ago

Until issue fixed, you can specify laravel/framework on installation with

composer create-project --prefer-dist laravel/laravel=5.7 vanilo.io

fulopattila122 commented 5 years ago

Today, the problem has been fixed in the menu component (release v1.3.0). To quickly fix an existing application do: composer update konekt/menu

fulopattila122 commented 5 years ago

Laravel 5.8 compatibility has been fully fixed in Vanilo v0.5.1. New installations will work from now on.

To fix an existing installation, run:

composer update 'vanilo/*' konekt/menu konekt/appshell