lavary/laravel-menu

composer require lavary/laravel-menu installs wrong source (not really latest stabile v1.7.7)

levaconline opened this issue · 4 comments

composer require lavary/laravel-menu installs wrong source.

not install source of v1.7.7

regardless git show writes: Versions : * v1.7.7

it is not source of v1.7.7

To check, open: nano /home/vagrant/testing/vendor/lavary/laravel-menu/src/Lavary/Menu/Link.php
and look at line:

public function __construct($path = array(), $builder) ...

this is old one line not compatible with php8.
in source code of v1.7.7 it should be:

public function __construct($path = array(), $builder = null) ...


➜ testing composer show lavary/laravel-menu
name : lavary/laravel-menu
descrip. : A quick way to create menus in Laravel 5
keywords : laravel
versions : * v1.7.7
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : https://github.com/lavary/laravel-menu
source : [git] https://github.com/lavary/laravel-menu.git 5592778
dist : [zip] https://api.github.com/repos/lavary/laravel-menu/zipball/5592778b3193ae561614ecb107467469b694ab11 5592778
path : /home/vagrant/testing/vendor/lavary/laravel-menu
names : lavary/laravel-menu

support
issues : https://github.com/lavary/laravel-menu/issues
source : https://github.com/lavary/laravel-menu/tree/master

autoload
psr-0
Lavary\Menu\ => src/

requires
illuminate/support >=5.0
illuminate/view >=5.0
php >=5.4.0
➜ testing

https://github.com/lavary/laravel-menu/blob/v1.7.7/src/Lavary/Menu/Link.php#L48

I'm not sure I follow what you're saying. The link above is v1.7.7 and it shows

public function __construct($path = array(), $builder)

Are you suggesting that we need to fix this, or are you saying your composer is pulling something different?

Maybe I'm wrong, but if i remember in some diff from middle of November I've seen:

public function __construct($path = array(), $builder = null)

instead actual:

public function __construct($path = array(), $builder)

However, if this error occurs only to me, please ignore this (we have made composer fork for this issues as solution).

php artisan --version
Laravel Framework 8.16.1
php -v
PHP 8.0.0 (cli) (built: Nov 27 2020 12:26:22) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.0, Copyright (c), by Zend Technologies

This throws error in some tests, like this:
AuthCest: LoginPHP Deprecated: Required parameter $builder follows optional parameter $path in /home/vagrant/statistics/vendor/lavary/laravel-menu/src/Lavary/Menu/Link.php on line 48

PHP8 not allow optional parameter to be before required one.

Thanx!