Developing a BC Break Scan Class

Learn about the infrastructural methods that are needed to create a BC break scan in PHP 8.

The BreakScan class is oriented toward a single file. In this class, we define methods that utilize the various break scan configuration just covered. If we need to scan multiple files, the calling program produces a list of files and passes them to BreakScan one at a time.

The BreakScan class can be broken down into two main parts: methods that define infrastructure and methods that define how to conduct given scans. The latter is primarily dictated by the structure of the configuration file. For each configuration file section, we’ll need a BreakScan class method.

Let’s have a look at the infrastructural methods first.

Defining BreakScan class infrastructural methods

In this section, we’ll have a look at the initial part of the BreakScan class. We also cover methods that perform infrastructure-related activities:

Get hands-on with 1200+ tech skills courses.