@oliver@phpc.social avatar

oliver

@oliver@phpc.social

Earning a living with #PHP since 2005. In love with modernizing legacy codebases, excited by mission critical features.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

bobmagicii, to random
@bobmagicii@phpc.social avatar

hey i got a table where the primary key iterated over 1mil. its been a while most our projects are tiny.

oliver,
@oliver@phpc.social avatar

@bobmagicii it's all good until you figure out that a rather important table has just run out of room for a PK that's signed int, which is also referenced from similar-sized tables via FKs 😶

oliver,
@oliver@phpc.social avatar

@bobmagicii Yes, I saw it's a bigint, you've done all your could. Wish it's been the same in my case. Instead, we had a war room set up and eventually worked around the problem in a rather disgusting way, but when the prod can't even be placed in a proper maintenance mode, then you grab whatever straw you can hang on to.

oliver,
@oliver@phpc.social avatar

@bobmagicii well yeah, that's dangerously similar 🤷🏼‍♂️

Our live table hit the unsigned int max. But, now we have 2 archives 😄 ...because the original one was so big that it'd take a couple of days or weeks (nobody knows for sure) to upgrade.

ramsey, (edited ) to random
@ramsey@phpc.social avatar

I managed to avoid for 10 years, but it’s finally caught up to me, so I hope I’m a Kubernetes god after going through all this required (by job) Kubernetes training.

When do I start honking like a duck goose?

oliver,
@oliver@phpc.social avatar

A minute of silence for the fallen brother, please

itsjoshbruce, to php
@itsjoshbruce@phpc.social avatar

It’s been so long since I did anything with authenticated users, curious about “modern” patterns and standards.

Specifically, an authenticated user wants to do something. What patterns and standards are you using for permissions?

I’m seeing middleware mentions. But, curious what else is out there. Not looking for “use Framework X” and should be testable. Doesn’t need to be web-specific as I’m just looking for patterns and standards.



oliver,
@oliver@phpc.social avatar

@itsjoshbruce middleware user here, on the most recent project. I can't say I'm particularly proud of it, but it does the job so far

oliver,
@oliver@phpc.social avatar

@itsjoshbruce it's the request (route or route group middleware). Authenticated user is set early to the container and then various areas are protected based on the user's roles. Of course, there are more detailed checks later in the flow (e.g. parts of the interface are hidden or different depending on role/permissions). Middleware is stopping the unintended actions, like playing with URLs to access what's not supposed to be seen or actioned on.

oliver, to php
@oliver@phpc.social avatar

If you were about to start a medium-sized project, what would you choose as an , and why? It should be something stable and well maintained. If the business takes off, then there should be no need to replace that layer.

Caveat: imagine that Doctrine and Eloquent haven't been invented yet.

oliver,
@oliver@phpc.social avatar

@thgs it is a side project that will be maintained by me for the foreseeable future. It has some commercial potential I hope, but if it starts growing fruits then I will make sure to bring someone in who will have enough experience and no fear to dive in, regardless of the libraries used. The goal is to start minimal.

Looks like some dbal + data mapper is the way to go, the latter probably something custom.

oliver,
@oliver@phpc.social avatar

@zimzat yeah, on the surface level things seem to be attractive, but as you go further and deeper, facepalms emerge. Some dbal & a custom data mapper will probably be the start.

I use Doctrine on my day-to-day work, and have used Eloquent before. Eloquent I liked up to some point, but can't say that for Doctrine. I wish I had more time to build something like Eloquent but with less magic and bloat (simple to use but not trying to do everything imaginable)

sirber, to php
@sirber@fosstodon.org avatar

There's not enough money in the world you can give me to work on your custom framework.

oliver,
@oliver@phpc.social avatar

@maxalmonte14 they either have no idea what they're doing, or have a very good idea*

  • by not using a framework I don't mean not using any components that may be a part of one. just not a full-blown "off the shelf" framework.
oliver,
@oliver@phpc.social avatar

@sirber come on, there's a price for every kind of work 🙃

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