AmpersandHQ / ampersand-magento2-upgrade-patch-helper

Helper script to aid upgrading magento 2 websites by detecting overrides. Now supports third party module detections
GNU Lesser General Public License v3.0
322 stars 39 forks source link

Refactor and unit tests #79

Closed convenient closed 2 years ago

convenient commented 2 years ago

This PR refactors the handling of checks.

The initial version of this module was a quick script to help us speed things up during our upgrades, and it kept evolving and getting more cluttered. The current state of it means its quite hard to see what is going on for each check, and makes it quite tricky and messy to add new checks.

This refactor doesn't touch any of the functional tests, as they're used as a baseline to prove the refactor works.

It does break each check into its own class, and adds unit tests to those classes which are very helpful for development and debugging.

Checklist