We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
11.4
8.2
Mysql 8.1
When providing a custom connection to the FreshCommand it is changing the application's default connection.
https://github.com/laravel/framework/blob/11.x/src/Illuminate/Database/Console/Migrations/FreshCommand.php#L65-L67
This was introduced in 11.4 by this PR - #51021
setConnection doesn't reset the default connection back to its original, unlike usingConnection.
<?php namespace Tests\Feature; use Tests\TestCase; class ExampleTest extends TestCase { /** * A basic feature test example. */ public function test_example(): void { $this->artisan('migrate:fresh', [ '--database' => 'non_default_connection', ]); dd(config('database.default')); } }
Laravel 11.3 output - "mysql" // tests/Feature/ExampleTest.php:18 Laravel 11.4 output - "non_default_connection" // tests/Feature/ExampleTest.php:18
"mysql" // tests/Feature/ExampleTest.php:18
"non_default_connection" // tests/Feature/ExampleTest.php:18
The text was updated successfully, but these errors were encountered:
Thanks for reporting! I've sent in a PR for this: #51167
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Laravel Version
11.4
PHP Version
8.2
Database Driver & Version
Mysql 8.1
Description
When providing a custom connection to the FreshCommand it is changing the application's default connection.
https://github.com/laravel/framework/blob/11.x/src/Illuminate/Database/Console/Migrations/FreshCommand.php#L65-L67
This was introduced in 11.4 by this PR - #51021
setConnection doesn't reset the default connection back to its original, unlike usingConnection.
Steps To Reproduce
Laravel 11.3 output -
"mysql" // tests/Feature/ExampleTest.php:18
Laravel 11.4 output -
"non_default_connection" // tests/Feature/ExampleTest.php:18
The text was updated successfully, but these errors were encountered: