Search code examples
phplaravellaravel-10infyom

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


Im installing laravelgenerator https://infyom.com/open-source/laravelgenerator/docs/10.0/installation

and I want to use the "Generate From Table" https://infyom.com/open-source/laravelgenerator/docs/generator-options#custom-table-name

php artisan infyom:scaffold Post --fromTable --table=posts --connection=remote

my DB
enter image description here

and my code in console with the error php artisan infyom:scaffold Qrcode --fromTable --table=qrcodes

   Error 

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

    1228▕     }
    1229▕
    1230▕     /**
    1231▕      * 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 did the dependency update, check database configuration, and the infyOm configuration, the qrcodes Tablen but nothing is wrong.

any idea please?


Solution

  • solution is update the doctrine in composer.json

    in this case "doctrine/dbal": "^3.5",