Making mixed issues easier to diagnose

March 29, 2021 by Matt Brown

When running Psalm at its strictest (level 1) Psalm will tell you when you’re doing something risky with a type it cannot infer. For example, when we…


Avoiding false-positives with flow-sensitive conditional analysis

February 2, 2021 by Matt Brown

It’s hard to develop a new static analysis tool for a language that’s been around a couple of decades — alarm bells go off in your users’ minds if…


Psalm supports PHP 8 Attributes

November 2, 2020 by Matt Brown

First, the headline: Psalm 4 now supports PHP 8’s attributes, with a bunch of new checks to make sure you’re using them correctly. The implementation…


Announcing Psalm 4

October 21, 2020 by Matt Brown

I’m really happy to announce the release of Psalm 4. If you’re unfamiliar with Psalm, it’s a free & open-source static analysis tool that helps…


Psalm 4: Fast by default

October 21, 2020 by Matt Brown

Psalm 4 comes with diff mode — where only changed methods and their dependents are analysed — turned on by default. This means Psalm runs much faster…


Better Unused Variable Detection in Psalm 4

October 21, 2020 by Matt Brown

The new version of Psalm comes with massively-improved unused variable detection. To understand why the new system is better, we're going to get a…


Psalm 4 supports PHP 8

October 21, 2020 by Matt Brown

PHP 8 is coming out soon, and Psalm is ready. Tip: as well as supporting all the new features outlined below, Psalm 4 can also tell you if your PHP 7…


Getting ready for Named Arguments

August 17, 2020 by Matt Brown

Named Arguments are coming to PHP with the release of PHP 8! Named Arguments will make many developers very happy, but they come with a pretty…


Detect PHP security vulnerabilities with Psalm

June 23, 2020 by Matt Brown

Security vulnerabilities are often pretty hard to spot manually. While a null-pointer error can make itself known very quickly, you can execute code…


Conditional love

April 13, 2020 by Matt Brown

Before Psalm was open-sourced, I had to first get it working on Vimeo’s codebase. One of the early hurdles was picking a return type for the…


It’s time to explain some things

March 23, 2020 by Matt Brown

For some of its users Psalm can seem mysterious – I often see commit messages along the lines of “make Psalm happy”, like it’s some sort of vengeful…


Psalm, now with slightly better type inference

January 7, 2020 by Matt Brown

Prepare yourselves for a mind-blowing piece of news: the latest minor version of Psalm (3.8.x) has slightly better type inference than 3.7.x. If…


PHP or Type Safety: Pick any two

December 5, 2019 by Matt Brown

PHP and type safety aren’t often used in the same sentence. PHP is a very popular language that’s essentially the backend web development equivalent…


Psalm supports PHP 7.4

November 27, 2019 by Matt Brown

Thursday, November 28th 2019 is a big day for PHP: version 7.4 will be released to the world. There are five major new language enhancements coming…


Immutability and beyond: verifying program behaviour with Psalm

September 10, 2019 by Matt Brown

As a language, PHP permits you to do basically anything. There are some built-in runtime constraints (like parameter and return types) that you can…


Psalm 3-and-a-half

August 23, 2019 by Matt Brown

It’s been over six months since version 3.0 of Psalm was released. There have been over a thousand commits to Psalm since then, bringing all sorts of…


Announcing Psalm support for Laravel

March 5, 2019 by Matt Brown

Today I’m releasing a Psalm plugin for Laravel! Background Two months ago I announced the latest version of Psalm, and discussed how its new plugin…


Uncovering PHP bugs with @template

January 30, 2019 by Matt Brown

This guide discusses functionality available in two PHP static analysis tools: Psalm (from Vimeo), and Phan. PHPStan has plans to support templated…


Announcing Psalm v3

January 3, 2019 by Matt Brown

TL;DR: Psalm is a PHP static analysis tool that’s designed to improve large codebases by identifying both obvious and hard-to-spot bugs through the…


Fixing code that ain’t broken

March 16, 2018 by Matt Brown

In June of 2015, the Vimeo Codebase was large, sprawling, and full of magic. It processed many millions of requests every hour. The users were happy,…