18

LARAVEL MEME OF THE DAY
If 60> requests are sent in a short amount of time (and you have Laravel Passport installed) you will not receive an IlluminateResponse instance anymore; you will instead receive a slightly different SymfonyResponse.

Why? For the glory of Satan, of course.

If your code doesn't account for that undocumented garbage, your code will start throwing middle fingers here and there.

Tell me again the productivity joke with Laravel, I've just lost an hour and a half 'cause unit tests were failing and I had no idea why.

Comments
  • 7
    Taylor Otwell while developing Laravel was like
    > Nah, it's not spicy enough.
    > You know what would make it a lot cooler?
    > Random undocumented behaviors. That's the shit
  • 1
    Please submit the issue on GH. This is baaaaad...
  • 1
    I actually liked Laravel, but I never used for a serious production project.
    I'll love to hear more horror story like this.

    I'd love to hear about any hidden shit in general.

    I know it's bad to say, but knowing everybody's else shit, it calms down my impostor syndrome
  • 2
    @willcandy let's say you have some checkboxes for a many to many relationship. Like, for example, some checkboxes to manage the roles of a user.

    Let's say you've just got your user and all of its roles from the DB, and you don't want the whole role shit; you just want the role id.
    So instead of having roles: [{verboseRole}, {verboseRole}, {verboseRole}] you want [roleId, roleId], or maybe something a bit different like roles{role1: true, role2: false}.
    Question: why would you want that?
    Answer: none of your business. Because some API wants stuff like this, idk

    Try exporting that from a controller. Once it hits "return" Laravel will overwrite everything to what it got from the DB, ignoring your modifications.
    I didn't surrender to just copying stuff from the model to some associative array, but it took 3 days of searching to find the answer in some filthy forum.

    No, I wouldn't be able to replicate the feat again and the forum is now long gone. That knowledge is lost forever.
  • 0
    Good lord, both of your stories sounds horrifying. I'm glad I left the PHP world before Laravel hit.
  • 0
    @IHateForALiving The last one feels weird. Did you mutate ORM objects instead of copying them in your preferred structure to a different object?
Add Comment