Yireo_ThemeOverrideChecker

PHP 8.1 - 8.4
Magento 2.4.7 | 2.4.8
CSP Yes
Latest Release 0.0.5

Magento version PHP version License Latest Version

Magento module to find all files of a given Magento theme (for example Magento/luma), compare the found files with the parent theme (and/or modules) and return whether there are differences or not.

Current status: Beta, ready for trying out

Installation

composer require yireo/magento2-theme-override-checker:@dev
bin/magento module:enable Yireo_ThemeOverrideChecker

Usage

List all possible overrides, with a warning for unneeded overrides (with no changes) and a red warning when lines are different:

bin/magento yireo:theme-overrides:check Magento/luma

List all specific override details for a specific file:

bin/magento yireo:theme-overrides:show Magento/luma web/jquery.js
bin/magento yireo:theme-overrides:show Magento/blank web/css/source/_theme.less

List a diff between the current version and the parent theme version:

bin/magento yireo:theme-overrides:diff Magento/luma web/css/source/_theme.less

FAQ

How does this work?

AmpersandHQ developed an excellent tool ampersand-magento2-upgrade-patch-helper to check the status of a current project. Part of this is that it also scans for override files in the theme. However, it does not report what overriding files actually means. For instance, is overriding an XML layout file good or bad? How many lines of overriding a JavaScript file classifies as a bad practice?

Todo

  • Support for multiple parent themes
  • Make contextLines in DifferGenerator configurable
  • Improve adviser
    • An XML layout file with dozens of line differences is ok
    • An XML override file is dangerous
    • An PHTML / JS / CSS file with dozens of line differences is dangerous
    • Markdown and text files can be the same
    • SVG files can be totally different

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation

Support

For getting support, create an Issue under the following project URL:

https://github.com/yireo/Yireo_ThemeOverrideChecker

Composer details
Magento module name
Yireo_ThemeOverrideChecker
Composer name
yireo/magento2-theme-override-checker
Composer version
0.0.5
Default branch
master
Requirements
sebastian/diff: ^1.0 || ^2.0 || ^3.0 || ^4.0 || ^5.0
symfony/finder: ^4.0 || ^5.0 || ^6.0 || ^7.0
magento/framework: ^101.0.1|^101.1|^102.0|^103.0
ext-dom: *
php: >=8.2 <8.6
Releases
0.0.5 23 October 2026
0.0.4 23 October 2026
0.0.3 23 October 2026
0.0.2 23 October 2026
0.0.1 23 October 2026
Changelog

[0.0.5] - 12 September 2024

Fixed

  • PHPStan fixes

[0.0.4] - 8 May 2024

Fixed

  • Add a command option to filter on file extension #3 @akosglue

[0.0.3] - 28 August 2023

Fixed

  • Remove old imports and unused $finder

[0.0.2] - 19 August 2023

Added

  • Improved advices
  • Add better styling
  • Lowered requirements for sebastian/diff (Magento 2.3)

[0.0.1] - 2 August 2023

Added

  • Initial release

Last modified: October 17, 2026