Skip to content

Conversation

eisberg
Copy link

@eisberg eisberg commented Jul 20, 2024

Closes #2613 and #2318

Added "forceUseAttributeReader" option to force use of the attribute reader for Gedmo attributes. Even if the project for Entity is in different NS, the XML driver is used.

By setting this option, Gedmo will only use the attribute reader to retrieve Gedmo meta information with entity settings. This does not affect the operation of Doctrine in any way.
The revision allows you to remove the Gedmo mapping from XML files in projects that use an ORM description in XML format.

Because Doctrine now prohibits placing third-party descriptions in XML files that do not comply with the doctrine schema.

The change with this modification is separated from the other MR, where 2 solutions were proposed.

Some projects (Symfony) will also require changes similar to those in the StofDoctrineExtensionsBundle (PR: stof/StofDoctrineExtensionsBundle#458 )

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Sep 30, 2025
@github-actions github-actions bot removed the Stale label Oct 1, 2025
@eisberg eisberg force-pushed the feature/use-attribute-mapping branch from 426f3ae to f439e38 Compare October 1, 2025 11:04
@eisberg
Copy link
Author

eisberg commented Oct 1, 2025

Tests added

--

The change is important for our large project, where there are about 1000 entities, and mapping is configured in XML files. Gedmo mapping had to be included in the php-classes attributes, since the doctrine with verification enabled prohibits orm.xml add additional settings.

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.

XML Validation Error with Doctrine 2.14.2
2 participants