PHP7

Don't use mocking libraries

Submitted by Larry on 14 September 2018 - 6:25pm

I am all for testing. Whether you always write unit tests in advance as Test Driven Development (TDD) advocates call for, write them after, write them alongside, a little of each, I don't care. Tests are your friend. You want tests, and specifically you want good tests.

There's a lot of opinions on what constitutes a "good" test, of course, and much is subjective to the type of code you're working on. However, since the release of PHP 7 I've found that while writing tests... I am never using a mocking library. In fact, I'm going to go as far and say that

You should never use a mocking library in PHP 7.

Before all of you gasp, clutch your pearls, and send ninja hit squads after me, let me justify that position.

Continue reading on Steemit

PHP 7 Explained: A review

Submitted by Larry on 31 December 2016 - 1:50pm

The team over at thePHP.cc recently published an ebook entitled PHP 7 Explained, "Everything you need to know about the next generation."

A few weeks back, I received an email from them stating "As a token of our appreciation for your involvement in the PHP community we would like to gift you a copy of our eBook." Yay, free stuff! Since I'd gotten it free, and it's of timely use to the PHP world, I decided to publish a formal review.

Disclaimer: I was not asked to write a review, although the authors did ask for feedback. The only compensation I receive for this review is the book itself, which was sent without the expectation of a review. Also to the authors, yes feel free to quote portions of this review on the books site as long as it's credited.

New Drupal, new Platform, new PHP, new year

Submitted by Larry on 31 December 2016 - 12:19pm

OK, well, it took a while, but I've finally gotten my blog off of Drupal 6. :-) Welcome to the new and improved Garfieldtech.com! My blog is unsurprisingly rather bland, as it's, well, a blog. That made updating to Drupal 8.2 using the Drupal migrate module reasonably easy. It wasn't hiccup free, and a few not-yet-updated modules got lost along the way, but it wasn't an epic struggle, either. There were only two major hiccups: