Skip to content

Commit

Permalink
Update CHECKS_AVAILABLE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
convenient committed Nov 8, 2023
1 parent 65f74d0 commit ac6c78a
Showing 1 changed file with 44 additions and 3 deletions.
47 changes: 44 additions & 3 deletions docs/CHECKS_AVAILABLE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Checks Available

# TODO redundant override
# TODO detail ignored

- [IGNR - Ignored Warnings](#ignr---ignored-warnings)
- [WARN - Preference](#warn---preference)
- [WARN - Preference Removed](#warn---preference-removed)
- [WARN - Plugin](#warn---plugin)
- [WARN - Plugin Enabled](#warn---plugin-enabled)
- [WARN - Plugin Disabled](#warn---plugin-disabled)
- [WARN - Override (phtml/js/html)](#warn---override-phtmljshtml)
- [WARN - Redundant Override](#warn---redundant-override)
- [WARN - DB schema added](#warn---db-schema-added)
- [WARN - DB schema removed](#warn---db-schema-removed)
- [WARN - DB schema changed](#warn---db-schema-changed)
Expand All @@ -23,6 +22,21 @@
- [INFO - Setup Patch Schema](#info---setup-patch-schema)
- [INFO - Setup Script](#info---setup-script)

## IGNR - Ignored Warnings

These can be seen by running the tool with `--show-ignore`

Any `WARN` level item can be flagged as ignored (`IGNR`) if the file that changed, that initiated the check, was deemed to have not actually changed in any meaningful way.

For example
- Changes to comments
- Changes to php doc block (copyright headers etc)
- Change to whitespace

These kinds of changes do not really require that we check for overrides or proceed to go through an actionable list of items to review.

Therefore, every `WARN` item can also be an `IGNR` item provided the file that triggered the check was not really changed.

## WARN - Preference
A preference exists for a class which was modified as part of this upgrade

Expand Down Expand Up @@ -124,6 +138,33 @@ If the upgrade changes `vendor/magento/module-checkout/view/frontend/templates/c

Check the changes in the core file with your override/extension, it may be that some changes need to be ported across.

## WARN - Redundant override

A file that was modified now matches an override of it in the codebase. It is very likely this override can just be removed as it is redundant.

This check is done after identifying the file as a [WARN - Override (phtml/js/html)](#warn---override-phtmljshtml), but has been converted to a "redundant override" after further analysis of the file contents.

There is some fuzzy matching going on here to ignore things that don't "really" matter, when comparing the files
- Comments
- Whitespace
- `.phtml` files also
- Ignore differences between short and long echo
- Ignore trailing `;` at end of single php lines

Example:

```
+-------+--------------------------+-------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
| Level | Type | File | To Check |
+-------+--------------------------+-------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
| WARN | Redundant Override | vendor/ampersand/upgrade-patch-helper-test-hyva-theme-stub/theme/Magento_Checkout/templates/cart/redundant.phtml | vendor/ampersand/upgrade-patch-helper-test-hyva-theme-extended/theme/Magento_Checkout/templates/cart/redundant.phtml |
+-------+--------------------------+-------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+
```

You have an override `vendor/ampersand/upgrade-patch-helper-test-hyva-theme-extended/theme/Magento_Checkout/templates/cart/redundant.phtml` which replaces `vendor/ampersand/upgrade-patch-helper-test-hyva-theme-stub/theme/Magento_Checkout/templates/cart/redundant.phtml`.

Those two files are now identical in functionality, and it is probable that the override can just be removed.

## WARN - DB schema added
A third-party `db_schema.xml` affecting the highlighted table has been added.

Expand Down

0 comments on commit ac6c78a

Please sign in to comment.