I'm encountering a BadMethodCallException when running migrations on a pre-existing Laravel application. The error message I'm getting is:
Method %s: %s does not exist.
at vendor\laravel\framework\src\Illuminate\Macroable\Traits\Macroable.php:115 111▕ */ 112▕ public function __call ($method, $parameters) 113▕ { 114▕ if (! static:hasMacro($method)) { ➜ 115▕ throw new BadMethodCallException(str ( 116▕ 'Method %s: %s does not exist.', static:class, $method 117▕). 118▕} 119▕
1 vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:495 Illuminate\Database\Connection:__call("getDoctrineSchemaManager", [])
2 vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:361 Illuminate\Database\DatabaseManager::__call ("getDoctrineSchemaManager", [])
Here are the troubleshooting steps I've already tried:
Checked for typos in method names.
Ensured the methods are defined.
Refreshed the autoloader with composer dump-autoload.
Cleared the Laravel cache using php artisan optimize:clear.
Verified that the doctrine/dbal package is installed.
Updated composer packages with composer update.
Checked service providers for correct registration.
Turned on debugging mode in the .env file.
Despite these efforts, the error persists. It appears that the issue might be related to a missing or incorrect method call, potentially within the migration files or due to misconfiguration.
Has anyone encountered a similar issue or have any insights on what might be causing this error? Any help would be greatly appreciated