Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DoctrineBridge] Fix the LockStoreSchemaListener #57944

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

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

MatTheCat
Copy link
Contributor

@MatTheCat MatTheCat commented Aug 8, 2024

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #54406
License MIT

#54407 got sidetracked and @barton-webwings seems no longer active on GitHub so this PR takes over.

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "7.2" but it seems your PR description refers to branch "6.4".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@@ -40,20 +39,4 @@ public function testPostGenerateSchemaLockPdo()
$subscriber = new LockStoreSchemaListener([$lockStore]);
$subscriber->postGenerateSchema($event);
}

public function testPostGenerateSchemaWithInvalidLockStore()
Copy link
Member

Choose a reason for hiding this comment

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

Maybe I'm a bit late to the party and missed an important part of the discussion of the previous PR. But… could you recap why we delete a test for a bugfix? I would've expected a new test instead that covers the bug that we want to fix.

Copy link
Member

Choose a reason for hiding this comment

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

@MatTheCat wrote done his reasoning here: #54407 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(I updated the testPostGenerateSchemaLockPdo so that it would fail.)

Copy link
Contributor Author

@MatTheCat MatTheCat Aug 8, 2024

Choose a reason for hiding this comment

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

You can see testPostGenerateSchemaWithInvalidLockStore is wrong because the function creating the generator is static, but its body is using $this. That means it only passes because the generator is not started and the LockStoreSchemaListener does not get any store.

@MatTheCat MatTheCat force-pushed the ticket_54406 branch 2 times, most recently from f356e02 to 5b05c10 Compare August 8, 2024 10:58
@nicolas-grekas nicolas-grekas modified the milestones: 7.2, 6.4 Aug 12, 2024
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

@nicolas-grekas
Copy link
Member

Thank you @MatTheCat.

@nicolas-grekas nicolas-grekas merged commit d5f7171 into symfony:6.4 Aug 13, 2024
9 of 10 checks passed
@MatTheCat MatTheCat deleted the ticket_54406 branch August 13, 2024 11:06
This was referenced Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DoctrineBridge] LockStoreSchemaListener not working properly
5 participants