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

[Feature] Support custom not found message based on Doctrine Bridge MapEntity #853

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

Conversation

Avariya
Copy link

@Avariya Avariya commented Sep 18, 2024

Use custom not found message from ORM bundle.

@Avariya
Copy link
Author

Avariya commented Sep 18, 2024

Tricky part is dependency bump, as 6.4 and 7.0 are not supported. Probably it should be new major version of DoctrineMongoDBBundle?

) {
parent::__construct($class, $objectManager, $expr, $mapping, $exclude, $stripNull, $id, null, $disabled, $resolver);
parent::__construct($class, $objectManager, $expr, $mapping, $exclude, $stripNull, $id, null, $disabled, $resolver, $message);
Copy link
Member

Choose a reason for hiding this comment

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

I think we can avoid locking in ^7.1 by checking if $message property exists in base class. We could also trigger a warning if someone passed the message when using older version of Symfony.

Copy link
Author

Choose a reason for hiding this comment

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

Done.
Not sure should it be @trigger_error or RuntimeException as trigger_error newer used at the project.

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.

2 participants