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

Allow classname in 'value' attribute of xml discriminator-mapping field #11453

Open
wants to merge 1 commit into
base: 2.19.x
Choose a base branch
from

Conversation

MatteoFeltrin
Copy link

@MatteoFeltrin MatteoFeltrin commented May 14, 2024

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.


class CustomerType
{
public $name;
Copy link
Member

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

Copy link
Author

@MatteoFeltrin MatteoFeltrin May 15, 2024

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",
        ...,
}

@MatteoFeltrin MatteoFeltrin force-pushed the allow-fqcn-in-value-attribute-of-discriminator-mapping branch from 9e2c8cf to 73e30df Compare May 20, 2024 09:01
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.

None yet

2 participants