Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 8 support #43

Closed
el3wdy opened this issue Jun 16, 2021 · 2 comments
Closed

Laravel 8 support #43

el3wdy opened this issue Jun 16, 2021 · 2 comments

Comments

@el3wdy
Copy link

el3wdy commented Jun 16, 2021

Hello,

this my error
[user@serv laravel-app]$ composer require akaunting/laravel-firewall
Using version ^1.3 for akaunting/laravel-firewall
./composer.json has been updated
Running composer update akaunting/laravel-firewall
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals

  • Locking akaunting/laravel-firewall (1.3.2)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 1 install, 0 updates, 0 removals
  • Installing akaunting/laravel-firewall (1.3.2): Extracting archive
    Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi

TypeError

Argument 2 passed to Illuminate\Routing\Router::middlewareGroup() must be of the type array, null given, called in /home/user/laravel-app/vendor/akaunting/laravel-firewall/src/Provider.php on line 60

at vendor/laravel/framework/src/Illuminate/Routing/Router.php:913
909▕ * @param string $name
910▕ * @param array $middleware
911▕ * @return $this
912▕ */
➜ 913▕ public function middlewareGroup($name, array $middleware)
914▕ {
915▕ $this->middlewareGroups[$name] = $middleware;
916▕
917▕ return $this;

  +9 vendor frames

10 [internal]:0
Illuminate\Foundation\Application::Illuminate\Foundation{closure}()

  +5 vendor frames

16 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

@thomascombe
Copy link
Contributor

I think you just have to run php artisan config:clear before run composer require.

Package provider try to register middlewares from config (config('firewall.all_middleware')), so if your config is cached new config is not available.

@denisdulici
Copy link
Member

You should clear config cache, if you're using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants