Skip to content
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

[10.x] Clean up DBAL deprecations #45289

Merged
merged 8 commits into from
Dec 20, 2022
Merged

[10.x] Clean up DBAL deprecations #45289

merged 8 commits into from
Dec 20, 2022

Conversation

driesvints
Copy link
Member

@driesvints driesvints commented Dec 13, 2022

This PR fixes some deprecations from the move to Doctrine DBAL v3 (since we're dropping support for DBAL v2). Most likely these will be removed in Doctrine v4. There's still a couple of left which I haven't determined the right path to migrate to yet. Left some notes on other quirks I found below.

@driesvints driesvints changed the title Clean up DBAL deprecations [10.x] Clean up DBAL deprecations Dec 13, 2022
class NoPendingMigrations
use Illuminate\Contracts\Database\Events\MigrationEvent as MigrationEventContract;

class NoPendingMigrations implements MigrationEventContract
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason this event didn't have the MigrationEvent contract which seemed odd to me. I can't think of a reason why it shouldn't have this.

@@ -164,7 +164,7 @@ public function testChangingColumnWithCollationWorks()
[
'CREATE TEMPORARY TABLE __temp__users AS SELECT age FROM users',
'DROP TABLE users',
'CREATE TABLE users (age INTEGER NOT NULL COLLATE "NOCASE")',
'CREATE TABLE users (age INTEGER NOT NULL)',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess these now will take the default collation.

'DROP TABLE users',
'CREATE TABLE users (name VARCHAR(255) DEFAULT NULL COLLATE "BINARY")',
'INSERT INTO users (name) SELECT name FROM __temp__users',
'DROP TABLE __temp__users',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems DBAL is now smarter here and doesn't creates temporary tables anymore when only a unique constraint or an index is added to the table.

@driesvints driesvints closed this Dec 13, 2022
@driesvints driesvints reopened this Dec 13, 2022
@driesvints driesvints marked this pull request as ready for review December 13, 2022 16:29
@taylorotwell taylorotwell marked this pull request as draft December 13, 2022 21:50
@driesvints driesvints marked this pull request as ready for review December 20, 2022 15:23
@taylorotwell taylorotwell merged commit bee4fd6 into master Dec 20, 2022
@taylorotwell taylorotwell deleted the cleanup-dbal branch December 20, 2022 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants