Quantcast
Channel: PHP Hypertext Processor
Viewing all articles
Browse latest Browse all 69

How to Perform Extract Service Refactoring When You Don't Have Tests

$
0
0
When you are refactoring in a legacy codebase, the goal is often to reduce complexity or separate concerns from classes, methods and functions that do too much work themselves. Primary candidates for refactoring are often controller classes or use-case oriented service classes (such as a UserService). Extracting new service classes is one popular refactoring to separate concerns, but without tests it is dangerous because there are many ways to break your original code – we show you how this can still be done.

Viewing all articles
Browse latest Browse all 69

Trending Articles