PHPnews.io

Overview for 'fideloper'

Mocking Stripe

Written by Fideloper / Original link on Jul. 22, 2021

I recently was searching for a way to mock Stripe API calls with Laravel Cashier in my test suite. I came across this issue, which had a great idea. In this scenario, we replace the HTTP Client used by the Stripe PHP SDK so we don't make any HTTP requests. Then we do some work to return some pre-cr…


2018

Written by Fideloper / Original link on Dec. 31, 2018

Here's my 2018 in review! Children, Time, Advice On January 1, 2018, my son was just 3 months and 6 days old. One thing you learn when you have a kid is that a LOT of the business and life advice we hear is not geared towards parents. There were so many times when I muttered "yeah, try that with a…


Laravel and Content Negotiation

Written by Fideloper / Original link on Oct. 2, 2018

Here's a little bit about content negotiation. An HTTP client, such as your browser, or perhaps jQuery's ajax method, can set an Accept header as part of an HTTP request. Accept Header This header is meant to tell the server what content types it is willing to accept. From the HTTP 1.1 spec, sectio…


Audio Gear for Video Casting Meatbags

Written by Fideloper / Original link on Oct. 2, 2018

Since I'm doing a lot of video casting lately, I've invested in some decent gear. It is, after all, a write off. Software This article is primarily about the hardware I use, but you might as well know about the software too. For editing screencasts, I started out recording using QuickTime (the one…


Laravel/Symfony Console Commands & Stderr

Written by Fideloper / Original link on Oct. 2, 2018

When we use Symfony's Console component to write CLI commands in PHP (and you should!), we're almost always writing any output to "stdout". There's a few ways to get general output from a CLI command using Console: // Run the command (Laravelish) public function fire() { echo "This is sent to stdou…