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

Merge 3.1.x into 4.0.x #11233

Merged
merged 16 commits into from
Feb 7, 2024
Merged

Merge 3.1.x into 4.0.x #11233

merged 16 commits into from
Feb 7, 2024

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Feb 7, 2024

No description provided.

derrabus and others added 16 commits February 3, 2024 19:43
…nator column condition SQL (doctrine#11200)

After commit doctrine@4e8e3ef when `\Doctrine\ORM\Query\SqlWalker` generates dicsriminator column condition SQL (method `\Doctrine\ORM\Query\SqlWalker::generateDiscriminatorColumnConditionSQL`) it adds an empty string to the list of possible values if the inheritance hierarchy contains a non-root abstract class. 

When the discriminator column is implemented with a custom type in PostgreSQL (equivalent of Enum) the query fails because the type cannot have a value of an empty string. It boils down to the fact that `\Doctrine\ORM\Mapping\ClassMetadataInfo::$subClasses` contains an abstract class and in its Metadata the value of `\Doctrine\ORM\Mapping\ClassMetadataInfo::$discriminatorValue` is `null`.

#### Previous behavior

In version 2.14.1 `\Doctrine\ORM\Mapping\ClassMetadataInfo::$subClasses` does not contain an abstract class.

Fixes doctrine#11199, fixes doctrine#11177, fixes doctrine#10846.
---------

Co-authored-by: Michael Skvortsov <michael.skvortsov@eleving.com>
Co-authored-by: Matthias Pigulla <mp@webfactory.de>
The static create() method is gone in version 3
* Add TokenType class
Co-authored-by: Alexander M. Turek <me@derrabus.de>

* Deprecated Lexer constants in favour of TokenType

* Replace all Lexer::T_ occurrences with TokenType::T_

* Add upgrade note

* Fixed import Lexer => TokenType

* Fixed deprecation phpdoc

* Replaced int value with matching constant of TokenType

* Update src/Query/Lexer.php

---------

Co-authored-by: Alexander M. Turek <me@derrabus.de>
* 2.18.x:
  Point link to correct upgrade guide (doctrine#11220)
  Ignore subclasses without discriminatorValue when generating discriminator column condition SQL (doctrine#11200)
  Update branches in README
* 3.0.x:
  Revert "Merge pull request doctrine#11229 from greg0ire/add-columns"
  Add columns for 3.1.x and 4.0x
  Update version ORM from 2 to 3 in docs (doctrine#11221)
  Clean up outdated sentence (doctrine#11224)
  Update README.md
  Point link to correct upgrade guide (doctrine#11220)
  Ignore subclasses without discriminatorValue when generating discriminator column condition SQL (doctrine#11200)
  Update branches in README
* 2.19.x:
  Add TokenType class (doctrine#11228)
* 3.1.x:
  Add TokenType class (doctrine#11228)
  Revert "Merge pull request doctrine#11229 from greg0ire/add-columns"
  Add columns for 3.1.x and 4.0x
  Update version ORM from 2 to 3 in docs (doctrine#11221)
  Clean up outdated sentence (doctrine#11224)
  Update README.md
  Point link to correct upgrade guide (doctrine#11220)
  Ignore subclasses without discriminatorValue when generating discriminator column condition SQL (doctrine#11200)
  Update branches in README
@derrabus derrabus merged commit 0917109 into doctrine:4.0.x Feb 7, 2024
63 checks passed
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.

6 participants