KnpLabs / DoctrineBehaviors

Doctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior
http://knplabs.com
MIT License
911 stars 287 forks source link

use ClassMetadataInfo to determine the referencedColumnName #667

Closed jorenMartens closed 2 years ago

jorenMartens commented 2 years ago

In case you want to use something else then 'id'.

Is it also possible to make a 2.2.1 release for php 7 support if this is approved?

TomasVotruba commented 2 years ago

Hi, thanks for sending PR.

We'll need a test case to verify this change didn't broke anything. In the past there were many hotfixes that added more new bugs, so we avoid by using tests.

jorenMartens commented 2 years ago

Hi Tomas, I don't know if this is the correct response for your question.

Let me know if you think it's a better idea to revert "TranslatableEntity, Test" changes and make separate entities/ tests

** Fixing phpstan now, forgot to run it

TomasVotruba commented 2 years ago

Thank you for such a fast test :+1: I've added 2 comments.

jorenMartens commented 2 years ago

Reverted last changes (see comments/ feedback from Tomas) and added new fixtures/ test

-> don't know how to fix phpstan '#Unable to resolve the template type T#'

TomasVotruba commented 2 years ago

I'm finally doing maintanence mergin of all new features and fixes :)

Thank you for the contribution, it looks well and tested :+1: