etrepat / baum

Baum is an implementation of the Nested Set pattern for Laravel's Eloquent ORM.
http://etrepat.com/baum
MIT License
2.24k stars 460 forks source link

Laravel 9.x Compatibility #344

Open laravel-shift opened 2 years ago

laravel-shift commented 2 years ago

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 9.x.

Before merging, you need to:

If you do find an issue, please report it by commenting on this PR to help improve future automation.

laravel-shift commented 2 years ago

:warning: The latest version of Laravel has a dependency for phpunit/phpunit of ^9.3. If you would like to also upgrade your tests, you may run the PHPUnit 9 Shift for free.

laravel-shift commented 2 years ago

:alembic: Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.

To do so, temporarily add Shift's fork to the repositories property of your composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/baum.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:

{
    "require": {
        "baum/baum": "dev-l9-compatibility",
    }
}

Finally, run: composer update

madhusudhan1234 commented 2 years ago

Hi Dear @laravel-shift and @etrepat I installed this package in laravel 9. While running the command php artisan baum:install Category Got the following exception, Can you please suggest what I am missing?



  Method Baum\Console\InstallCommand::__invoke() does not exist

  at vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:147
    143▕             $callback = [$callback, '__invoke'];
    144▕         }
    145▕ 
    146▕         return is_array($callback)
  ➜ 147▕                         ? new ReflectionMethod($callback[0], $callback[1])
    148▕                         : new ReflectionFunction($callback);
    149▕     }
    150▕ 
    151▕     /**

      +15 vendor frames 
  16  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))```
lionwalker commented 1 year ago

@laravel-shift or someone using laravel-shift code

There is an issue on vendor\baum\baum\src\Baum\Move.php on line 355.

$method = $halt ? 'until' : 'fire';

need to change as

$method = $halt ? 'until' : 'dispatch';