sirber,
@sirber@fosstodon.org avatar

/ Eloquent looks way easier than / typeorm and / / 😅

Crell,
@Crell@phpc.social avatar

@sirber Please use Doctine instead. Please. Eloquent is garbage that makes producing unmaintainable software easy.

sirber,
@sirber@fosstodon.org avatar

@Crell a little comparison

https://medium.com/@joseemiguelq/laravel-with-eloquent-or-doctrine-4be652fb8c60

I'm not a fan of the faux decorators...

Crell,
@Crell@phpc.social avatar

@sirber Eloquent is based on magic methods, silent properties, mutable globals, and static methods. Those are all antipatterns.

Doctine feels over engineered, but it's actually testable. Eloquent screws you on testing, then tries to make you think it's OK by throwing more magic at it.

sirber,
@sirber@fosstodon.org avatar

@Crell In , I would just mock the repository layer and do no db calls 😅

Crell,
@Crell@phpc.social avatar

@sirber Right. How do you do that in Eloquent? It actively works against doing clean DI, and makes mocking impossible without going through their proprietary mocker.

sirber,
@sirber@fosstodon.org avatar

@Crell I have nothing so far. Haven't touched php in 5 years. I'm gonna start a new test project, follow the succulentes and see how it's going on.

Crell,
@Crell@phpc.social avatar

@sirber Modern PHP is pretty sweet. I just wish people would stop using it through a terrible framework that avoids leveraging any of the features of modern PHP.

sirber,
@sirber@fosstodon.org avatar

@Crell how about Symphony?

Crell,
@Crell@phpc.social avatar

@sirber Pretty good overall, but does have a bit higher curve. If Laravel cribs from Ruby on Rails, Symfony is inspired by Java Spring Boot. When I want a major framework I usually go Symfony.

Crell,
@Crell@phpc.social avatar

@sirber Oh, and on the faux decorators, those are Annotations. Hack to do the in docsblocks.

PHP now has native attributes and basically everyone who matters has switched over to them. Much nicer, natively supported.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Laravel
  • PowerRangers
  • DreamBathrooms
  • ethstaker
  • magazineikmin
  • everett
  • InstantRegret
  • Youngstown
  • vwfavf
  • slotface
  • rosin
  • cubers
  • ngwrru68w68
  • kavyap
  • thenastyranch
  • provamag3
  • Durango
  • cisconetworking
  • khanakhh
  • osvaldo12
  • mdbf
  • modclub
  • GTA5RPClips
  • normalnudes
  • tester
  • tacticalgear
  • anitta
  • Leos
  • megavids
  • All magazines