Review and next steps

At this point, we have removed all global calls in our classes, as well as all uses of superglobals. This is another big improvement in the quality of our codebase. We know that variables can be modified locally and not affect other parts of the codebase.

However, our classes may still have hidden dependencies in them. In order to make our classes more testable, we need to discover and reveal those dependencies. That is the subject of the next chapter.

Get Modernizing Legacy Applications in PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.