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

Fix HydrationException::invalidDiscriminatorValue parameter type #9676

Merged
merged 1 commit into from Apr 24, 2022

Conversation

franmomu
Copy link
Contributor

@franmomu franmomu commented Apr 24, 2022

Ref #9675 (comment)

The calls to HydrationException::invalidDiscriminatorValue are using array_keys:

throw HydrationException::invalidDiscriminatorValue($discriminatorValue, array_keys($discrMap));

throw HydrationException::invalidDiscriminatorValue($row[$discrColumnName], array_keys($discrMap));

So what invalidDiscriminatorValue is receiving are the possible discriminator values.

Copy link
Member

@derrabus derrabus left a comment

Choose a reason for hiding this comment

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

Thanks! ❤️

@derrabus derrabus added this to the 2.12.2 milestone Apr 24, 2022
@derrabus derrabus merged commit b7e9dd0 into doctrine:2.12.x Apr 24, 2022
@franmomu franmomu deleted the discriminator_values branch April 24, 2022 17:38
derrabus added a commit to derrabus/orm that referenced this pull request Apr 26, 2022
* 2.13.x:
  Remove dynamic property declarations (doctrine#9683)
  PHPStan 1.6.0 (doctrine#9682)
  Validate XML mapping against XSD file
  Document ORM drivers only really load ORM metadata
  Fix HydrationException::invalidDiscriminatorValue parameter type (doctrine#9676)
  Fix type on ClassMetadata discriminatorMap (doctrine#9675)
derrabus added a commit to derrabus/orm that referenced this pull request Apr 27, 2022
* 2.13.x:
  PHPStan 1.6.1 (doctrine#9688)
  Drop SymfonyStyle[listing] for sqls (doctrine#9679)
  Remove dynamic property declarations (doctrine#9683)
  PHPStan 1.6.0 (doctrine#9682)
  Validate XML mapping against XSD file
  Document ORM drivers only really load ORM metadata
  Fix HydrationException::invalidDiscriminatorValue parameter type (doctrine#9676)
  Fix type on ClassMetadata discriminatorMap (doctrine#9675)
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.

None yet

2 participants