8000 favor Table::addPrimaryKeyConstraint() over Table::setPrimaryKey() by xabbuh · Pull Request #11882 · doctrine/orm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

favor Table::addPrimaryKeyConstraint() over Table::setPrimaryKey() #11882

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
Mar 25, 2025

Conversation

xabbuh
Copy link
Member
@xabbuh xabbuh commented Mar 24, 2025

@xabbuh
Copy link
Member Author
xabbuh commented Mar 24, 2025

tests were already failing before on the 3.4.x branch (#11883 should fix them)

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.

Thanks @xabbuh!
I'd be nice merging these PRs ASAP to help make the Symfony CI green again 🙏

Copy link
Member
@beberlei beberlei left a comment

Choose a reason for hiding this comment

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

Why are the symfony CI tests failing? The referenced PR is in an unreleased branch of DBAL.

@@ -282,7 +286,17 @@ public function getSchemaFromMetadata(array $classes): Schema
}

if ($pkColumns !== []) {
$table->setPrimaryKey($pkColumns);
if (class_exists(PrimaryKeyConstraint::class)) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you factor this method out? its repeated three times.

Copy link
Member Author

Choose a reason for hiding this comment

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

done, not sure though how I can satisfy PHPStan

Copy link
Member
@greg0ire greg0ire Mar 25, 2025

Choose a reason for hiding this comment

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

I think you have to add more lines under

# DBAL 4 compatibility

@xabbuh xabbuh force-pushed the dbal-6867 branch 3 times, most recently from ab75661 to f3620b4 Compare March 25, 2025 11:30
@xabbuh xabbuh force-pushed the < 8000 span > dbal-6867 branch from f3620b4 to c55f10e Compare March 25, 2025 11:40
@greg0ire
Copy link
Member

Why are the symfony CI tests failing? The referenced PR is in an unreleased branch of DBAL.

@xabbuh @nicolas-grekas tell me if I'm wrong, but I think Symfony is deliberately using dev dependencies, including for Doctrine because of Doctrine Bridge (typically, to address deprecations before they hit end users).

@nicolas-grekas
Copy link
Member

@greg0ire correct. This allows spotting changes as early as possible: bugs, deprecations, etc. And makes adopting new versions of Doctrine way smoother.

@greg0ire greg0ire added this to the 3.3.3 milestone Mar 25, 2025
@greg0ire greg0ire merged commit 4baa7bd into doctrine:3.3.x Mar 25, 2025
84 checks passed
@xabbuh xabbuh deleted the dbal-6867 branch March 25, 2025 15:10
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.

4 participants
0