In a prior tip, I showed multiple workarounds I needed to implement to cope with some messy JSON from a third-party API.
In a perfect world, I'd work with the API vendor and get them to fix the issue on their end. In this case, the vendor was open to fixing it, but it was clear it wasn't going to happen in time for our feature launch.
So instead, I implemented the workaround, but also did a few extra things to make sure I maintained the overall quality of my codebase.
- I added a detailed comment to both workarounds explaining why this was being done.
- I tested that my workarounds wouldn't break if they fixed the issue without informing me.
- I created a new issue to follow up with the vendor post-launch and coordinate a fix.
With all that in place, I felt pretty good about the workaround.
Here to help,
P.S. If you want your Laravel apps to feel more "battle ready", check out this book from Ash Allen, and help support our efforts to publish these tips as well.