Category: Standards

2FA in Laravel with Google Authenticator – Get Secure!

There are many ways an attacker can get a user’s password. It could happen through social engineering, key logging, or by some other nefarious means. Passwords alone are not enough to protect users from their accounts being compromised, specially if an attacker somehow has their credentials. To get around this s...

Testing PHP Code with Atoum – an Alternative to PHPUnit

If you’ve been around PHP for more than a little while, you’ve no doubt started to test your code. And if you ask anyone in the PHP space what to use for writing unit tests, likely the first answer that they’ll give you is PHPUnit. It’s the de facto standard in the PHP community, and with good reason. But it’...

From HTTP Messages to PSR-7: What’s It All About?

The PHP Framework Interoperability Group (PHP-FIG) has relatively recently approved another proposal, the PSR-7: HTTP Messages Interface. The document crystallizes HTTP messages into 7 interfaces which a PHP library should implement if they subscribe to the specification. In [PSR-7 By Example] (https://mwop.net/blog/20...

Quick Intro: PhpCompatibility for PHPCS – Are You PHP7 Ready?

Sooner or later, there will come a time when you will need to migrate your projects to different PHP versions. How will you check if you’re compatible with a PHP version different to the one you’ve been developing on? One possibility is always to install the version of PHP we want to migrate to, run […...

PHP-FIG Alternatives: The Pros and Cons of Various Visions

In his article The Past, Present and Future of the PHP-FIG, Larry Garfield gives a whirlwind tour of his impressions of the FIG, from its founding to one of its possible futures. I encourage you to read it in its entirety before continuing. Herein, I will attempt to address some of the errors and omissions in LarryR...

The past, Present and Future of the PHP-FIG

The PHP Framework Interoperability Group (PHP-FIG, or just FIG for short) is at a crossroads. Many electrons have been sacrificed talking about FIG’s tribulations of late, but sadly much of it has been FUD, with little effort spent on the positive. At SitePoint’s invitation, I’d like to offer a more...

PHP-FIG, Quo Vadis?

The Polish writer, Henryk Sienkiewicz, was awarded the 1905 Nobel prize for Literature for his epic novel Quo Vadis, which is a Latin phrase meaning “Where are you going?”. In the face of any dilemma, a brief pause and redefinition of one’s goals may be therapeutic.The PHP Framework Interoperabilit...

Static analysis with PHPSA: PHP Smart Analyzer

One requirement that never changes whether you are working on your projects alone or in a team, on small projects or big, is Code Quality. The bigger the project and the team, the harder it gets to maintain it.A good way of slowing this increase in difficulty down is to use static analysis tools. Static analysis is t...

Sourcehunt 2016.8 – Contribute to Regression, Regex, ORMs, and More

Sourcehunt August 2016 Vacations are over, and it’s time to hunt some open source contributions again! austintoddj/Canvas [561 ★] Canvas is a new mini-CMS aimed at developers who need personal blogs. It aims to be both pretty, and pretty usable. I’ve tried it out in my hunt for a personal blogging engine,...

Cleaning up Code: Is Refactoring for Aesthetics worth It?

Most development teams want to get their codebase into a better, more maintainable state. But what definition of better should be chosen? In many cases, it is not necessary to dig deep into Domain Driven Design (DDD) to achieve this goal. Sometimes, it's even counter productive. But one of the most basic collection...