-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
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
[slim-skeleton-11.x] Test Improvements #49111
Conversation
Signed-off-by: Mior Muhammad Zaki <[email protected]>
@Jubeki There seems to be some collation-related issue with MySQL 5.7 tests and MariaDB tests |
@crynobone That kind of was to be expected, because MySQL 5.7 doesn't support the new collation. Based on https://laravel.com/docs/master/database#introduction I thought MySQL 8.0+ is only supported, which was one of the reasons for the change. Another reason was laravel/laravel#6239 which was reverted by laravel/laravel#6240 Now there are also discussions about reverting the Drop of MySQL 5.7 Support laravel/docs#9113 Possible solutions:
The default for new Laravel 11 Applications should be the newer collation. Even if MySQL 5.7 is supported / deprecated in Laravel 11, we can give a meaningful error solution via Ignition (See laravel/docs#9113 (comment)) |
Is there any good approach to detect MySQL 5.7 vs 8 as well as MariaDB versions? |
My only idea for now: Is the collation available or not. Will research a little bit. |
The following should work (needs to be tested) SHOW VARIABLES LIKE 'version';
# or
SELECT VERSION(); |
Signed-off-by: Mior Muhammad Zaki <[email protected]>
Signed-off-by: Mior Muhammad Zaki <[email protected]>
@Jubeki Found a better solution, allow setting |
@crynobone cool 👍 Do you want to merge my PR #49113 into this one? |
Yes please |
[slim-skeleton-11.x] Fix MariaDB Tests with changed query
* Test Improvements Signed-off-by: Mior Muhammad Zaki <[email protected]> * Fix MariaDB Tests with changed query * Fix Testbench version * Allow to override collation using DB_COLLATION Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> --------- Signed-off-by: Mior Muhammad Zaki <[email protected]> Co-authored-by: Julius Kiekbusch <[email protected]>
Using
$this->artisan()
withCommand::$aliases
doesn't work properly at the moment. I believe this is due to how Symfony registers commands vs how Laravel resolves it with$signature
.