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

Drop support for unserializing old serialization formats #10986

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions lib/Doctrine/ORM/Query/ParserResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
*/
class ParserResult
{
private const LEGACY_PROPERTY_MAPPING = [
'sqlExecutor' => '_sqlExecutor',
'resultSetMapping' => '_resultSetMapping',
'parameterMappings' => '_parameterMappings',
];

/**
* The SQL executor used for executing the SQL.
*/
Expand Down Expand Up @@ -121,20 +115,4 @@ public function getSqlParameterPositions(string|int $dqlPosition): array
{
return $this->parameterMappings[$dqlPosition];
}

public function __wakeup(): void
{
$this->__unserialize((array) $this);
}

/** @param array<string, mixed> $data */
public function __unserialize(array $data): void
{
foreach (self::LEGACY_PROPERTY_MAPPING as $property => $legacyProperty) {
$this->$property = $data[sprintf("\0%s\0%s", self::class, $legacyProperty)]
?? $data[sprintf("\0%s\0%s", self::class, $property)]
?? $this->$property
?? null;
}
}
}
Binary file not shown.
Binary file not shown.