KnpLabs / DoctrineBehaviors

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

Removed hardcoded identifier. #570

Closed javi-p-nt closed 3 years ago

javi-p-nt commented 4 years ago

Use classmetadatainfo to de-hardcode 'id' (for other identifier names like uuid). Allows multiple identifiers too.

TomasVotruba commented 4 years ago

Could you add test that failed before this fix? Just so we're sure it works

javi-p-nt commented 4 years ago

Could you add test that failed before this fix? Just so we're sure it works

Sorry, don't know how. It's running well on my local though :|

TomasVotruba commented 4 years ago

Basically copy this: https://github.com/KnpLabs/DoctrineBehaviors/blob/3eed95ec2e2512b8995ce039d0767bac661fd7c4/tests/ORM/TranslatableTest.php#L30-L50

And instead of TranslatableEntity create own class, that has different id name.

TomasVotruba commented 3 years ago

Hi, I'm going through old opended issues and PRs to cleanup too-long-opened items and close them. Thank you for your contribution and time.

We needs a feature with test and passing CI to be able to merge it without letting a bug in. If this is still relevant for you, please add code with test and make CI pass first. Then we'll able to merge your feature without further waiting :+1:

Thank for understanding.