Introducing static analysis tools to legacy projects


Abstract

PHP is blessed with several high quality static analysis and code quality tools. Adding these tools to legacy projects can be problematic; they'll find hundreds if not thousands of issues. It is often impossible to fix all the issues before continuing development.

Some tools get around this using a baseline feature - creating a list of issues and only reporting new ones. But what if you're using a tool that does not have a baseline feature?

This talk first examines various baselining techniques, highlighting the best use-case for each. It then investigates the baselining features that some static analysis tools use. We are then introduced to SARB (Static Analysis Results Baseliner). SARB is used for adding baselining functionality to tools that don't have their own baselining functionality.

By the end of this talk you'll know how to add most static analysis tools to your legacy project.


See more talks.

Events
PHPSW Mar 2023

[slides] [video] [website]