Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

KNP Doctrine behaviors vs Atlantic18 Doctrine extensions

Just curious about there being two different libraries handling Doctrine2 behaviors/extensions (loggable, timestampable, etc.): KNPLabs DoctrineBehaviors and Atlantic18 DoctrineExtensions, which seems to continue the work by Gediminas.

What are the main differences about them?

I can see Atlantic18's supports multiple drivers, while KNPLabs's dont, it also has some more features (Sortable, IpTraceable). On the other hand KNPLabs's uses traits, and is backed by KNP.

Also, any reason to refer to Atlantic18's in Symfony2's doc instead of KNPLabs's?

like image 358
hectorh30 Avatar asked Nov 10 '14 06:11

hectorh30


2 Answers

KnpLabs\DoctrineBehaviors 2.0 released in 2020

Both packages have been dying since ~2017. After many unheard issues I got an email from KnpLabs. I took over KnpLabs\DoctrineBehaviors in December 2019, version 2.0 is out and being tested.

Symfony 5 support, PHP 7.4 support, Rector, ECS, PHPStan in the CI now makes sure code is maintainable in the future.

Read more about new version in this post: Doctrine Behaviors 2.0 - Reloaded

like image 51
Tomas Votruba Avatar answered Oct 24 '22 02:10

Tomas Votruba


I've used the Atlantic18 (which I refer to as the Gedmo extensions because that's the namespace you work with) I have not however used the KNP exentions but looking at the repo I can maybe point out a few things I noticed:

Atlantic18 DOES have traits if you want them: for example

Atlantic18 also has the ability to use doctrine annotations, which I like

and it looks to me like the Atlantic18 is a bit more configurable in the way that you can specify your column names it doesn't look like you can do that with KNP extensions.

That being said, getting started with the Atlantic18 looks like it's a little harder than getting started with the KNP extensions. Also, when I started using the Atlantic18 extensions, it was is a strange transition period from gedmo to Atlantic18 so the documentation and development was a bit dated and hard to follow, but it's looks like it's been updated now.

like image 36
Jaimz Avatar answered Oct 24 '22 03:10

Jaimz