-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Allow classname in 'value' attribute of xml discriminator-mapping field #11453
Allow classname in 'value' attribute of xml discriminator-mapping field #11453
Conversation
|
||
class CustomerType | ||
{ | ||
public $name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's declare string
here, or directly use constructor property promotion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHPStorm gives these errors:
Typed properties are only allowed since PHP 7.4
Constructor property promotion is only allowed since PHP 8.0
Composer.json
"require": {
"php": "^7.1 || ^8.0",
...,
}
9e2c8cf
to
73e30df
Compare
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO to be merged in
Thanks @MatteoFeltrin ! |
fixes #11449
In relation to #10630
This PR allows a more loosen validation of the value attribute of discriminator-mapping field, using orm:type in the XSD schema as it was done in the linked pull request.
The test I wrote loads the entity enabling the validation against XSD schema, thus expects no exception to be thrown.