...
/Learning how to spot BC breaks before a migration
Learning how to spot BC breaks before a migration
Learn about BC breaks and the techniques we can use to scan for them in PHP 8.
Ideally, we should go into the PHP 8 migration with an action plan in hand. A critical part of this action plan includes getting an idea of how many potential BC (backwards-compatability) breaks exist in our current code base. We show how to develop a BC break sniffer that automates the process of looking through hundreds of code files for potential BC breaks.
As we know about BC issues that might arise in PHP 8.
An overview of BC breaks
We already know, having read the previous chapters in this course, that potential code breaks originate from several sources. Let’s briefly summarize the general trends that might lead to code failure after a migration since we are familiar with these topics.
Resource-to-object migration
Minimum versions for supporting OS libraries
Iterator
toIteratorAggregate
migrationRemoved functions
Usage changes
Magic method signature enforcement ...