Laravel-ide-helper: Flysystem\Local error back on Lumen 8

Created on 2 Dec 2020  路  2Comments  路  Source: barryvdh/laravel-ide-helper

Versions:

  • ide-helper Version: 2.8.x-dev
  • Lumen Version: 8.2.1
  • PHP Version: 7.4.4

Description:

Generate fails due to a dependency on League\Flysystem\Local. league/flysystem is installed but the class doesn't seem to exist.

Steps To Reproduce:

php artisan ide-helper:generate

Error shown:


In FilesystemManager.php line 164:

  Class 'League\Flysystem\Adapter\Local' not found
bug

Most helpful comment

The workaround I have now is:

  1. composer require --dev league/flysystem=^1.1
  2. Edit _vendor/barryvdh/laravel-ide-helper/src/IdeHelperServiceProvider.php_

    Remove or comment out this code (search for Application, lines 119-121 in mine):

            if ((int) Application::VERSION < 8) {
                return new PhpEngine();
            }
    

Of course, this doesn't help that much if you want to commit everything in git and have it work later.

All 2 comments

Looks like league/flysystem 2.0 changed its structure, so now this is in here:

  • File: vendor/league/flysystem/src/Local/LocalFilesystemAdapter.php
  • Class path: League\Flysystem\Local\LocalFilesystemAdapter

Version 1.x is the one that fixes this error: composer require --dev league/flysystem=^1.1 but exhibits bug #1042 instead

The workaround I have now is:

  1. composer require --dev league/flysystem=^1.1
  2. Edit _vendor/barryvdh/laravel-ide-helper/src/IdeHelperServiceProvider.php_

    Remove or comment out this code (search for Application, lines 119-121 in mine):

            if ((int) Application::VERSION < 8) {
                return new PhpEngine();
            }
    

Of course, this doesn't help that much if you want to commit everything in git and have it work later.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  5Comments

4n70w4 picture 4n70w4  路  3Comments

hatamiarash7 picture hatamiarash7  路  3Comments

Newbie012 picture Newbie012  路  4Comments

Alymosul picture Alymosul  路  4Comments