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

Remove partial syntax in DQL #10985

Merged
merged 3 commits into from
Oct 11, 2023
Merged

Conversation

greg0ire
Copy link
Member

It is no longer possible to use the PARTIAL keyword in a DQL query, or to artificially build an AST with a partial object expression. It is still possible to use the result set mapping API to build partial objects.

@greg0ire
Copy link
Member Author

greg0ire commented Oct 10, 2023

Forbidding building partial objects will be attempted in a separate PR, it will require a substantial rework of the tests, they seem to heavily rely on that ability. A possible solution might be to build a factory, allowing us to specify just the properties that we care about. Note that building such objects through that API does not trigger any deprecation.

@greg0ire
Copy link
Member Author

Converting to draft as I've found more stuff to remove

@greg0ire greg0ire force-pushed the remove-partial-from-dql branch 2 times, most recently from 3a78c29 to 7c1adbf Compare October 10, 2023 12:27
beberlei
beberlei previously approved these changes Oct 11, 2023
UPGRADE.md Outdated
@@ -1,5 +1,13 @@
# Upgrade to 3.0

## BC BREAK: Partial objects are removed

- The `PARTIAL` keyword no longer exists.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- The `PARTIAL` keyword no longer exists.
- The `PARTIAL` keyword in DQL no longer exists.

@greg0ire greg0ire marked this pull request as ready for review October 11, 2023 08:03
It is no longer possible to use the "PARTIAL" keyword in a DQL query, or
to artificially build an AST with a partial object expression. It is
still possible to use the result set mapping API to build partial
objects.
@greg0ire greg0ire merged commit 18897fa into doctrine:3.0.x Oct 11, 2023
57 checks passed
@greg0ire greg0ire deleted the remove-partial-from-dql branch October 11, 2023 08:49
@greg0ire greg0ire added this to the 3.0.0 milestone Oct 11, 2023
@walva
Copy link

walva commented Dec 5, 2023

I wonder what was the reasoning behind this move. I use this feature time to time and I know ApiPlatform rely on it.

@greg0ire
Copy link
Member Author

greg0ire commented Dec 5, 2023

The place to discuss that is #8471

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants