InfyOmLabs / laravel-generator

API and Admin Panel CRUD Generator for Laravel.
https://www.infyom.com/open-source
MIT License
3.79k stars 813 forks source link

Call to undefined method Doctrine\DBAL\Connection::createSchemaManager() #1089

Open dhsont opened 1 year ago

dhsont commented 1 year ago

HI i am getting Error Call to undefined method Doctrine\DBAL\Connection::createSchemaManager() when trying to generate scaffold from dattabase table using following command

`php artisan infyom:scaffold User --fromTable --table="users"`

Error ` Error

        Call to undefined method Doctrine\DBAL\Connection::createSchemaManager()

        at vendor\laravel\framework\src\Illuminate\Database\Connection.php:1254
          1250▕     public function getDoctrineSchemaManager()
          1251▕     {
          1252▕         $connection = $this->getDoctrineConnection();
          1253▕
        ➜ 1254▕         return $connection->createSchemaManager();
          1255▕     }
          1256▕
          1257▕     /**
          1258▕      * Get the Doctrine DBAL database connection instance.

        1   vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:469
            Illuminate\Database\Connection::getDoctrineSchemaManager()

        2   vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:353
            Illuminate\Database\DatabaseManager::__call("getDoctrineSchemaManager", [])

`

I tried it with laravel 10 with following packages

"doctrine/dbal": "~2.3", "infyomlabs/laravel-generator": "^6.0", "infyomlabs/adminlte-templates": "^6.0"

I tried with blank laravel 10 ad infyomlab Generator but still gettigng error.

Way to reproduce is

Create new laravel project install infyomlab generator try to generate scaffold.

dhsont commented 1 year ago

Issue fixed by existing solution by @ImAkPatil in https://github.com/InfyOmLabs/laravel-generator/issues/1083#issuecomment-1703810621_

Issue fixed by updating doctrine/dbal "doctrine/dbal": "^3.5",

Docs must be updated