Helper script to aid upgrading magento 2 websites by detecting overrides. Now supports third party module detections

Overview

ampersand-magento2-upgrade-patch-helper

Helper scripts to aid upgrading magento 2 websites, or when upgrading a magento module

Build Status

This tool looks for files which have been modified as part of the upgrade and attempts to see if you have any overrides in your site. This allows you to focus in on the things that have changed and are specific to your site.

This tool checks for

  • Preferences (in global/frontend/adminhtml di.xml)
  • Overrides
    • phtml / js
    • layout xml
    • html (knockout templates)
  • Plugins for methods which have been affected by the upgrade.

If you have any improvements please raise a PR or an Issue.

How to use

All the below should be used on a local setup, never do any of this anywhere near a production website.

It is most reliable if you use this when the instance has been built and is plugged into a database just in case you have theme configuration stored there. Running this without it being plugged into a database could cause some of the theme analysis to be missed.

Step 1 - Composer update the dependencies then generate a patch

In your project composer install and move the original vendor directory to a backup location

cd /path/to/magento2/
composer install
mv vendor/ vendor_orig/

Update your magento version (or third party module) to the one required, with b2b or other extensions if applicable.

composer install
composer require magento/product-enterprise-edition 2.2.6 --no-update
composer require magento/extension-b2b 1.0.6 --no-update
composer require thirdparty/some-module "^2.0" 
composer update magento/extension-b2b magento/product-enterprise-edition thirdparty/some-module --with-dependencies

At this point you may receive errors of incompatible modules, often they are tied to a specific version of magento. Correct the module dependencies and composer require the updated version until you can run composer install successfully.

Once you have a completed the composer steps you can create a diff which can be analysed.

diff -ur vendor_orig/ vendor/ > vendor.patch

By generating the diff in this manner (as opposed to using wget https://github.com/magento/magento2/compare/2.1.15...2.1.16.diff) we can guarantee that all enterprise and magento extensions are also covered in one patch file.

Step 2 - Parse the patch file

In a clone of this repository you can analyse the project and patch file.

git clone https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper
cd ampersand-magento2-upgrade-patch-helper
composer install
php bin/patch-helper.php analyse /path/to/magento2/

This will output a grid of files which have overrides/preferences/plugins that need to be reviewed and possibly updated to match the changes defined in the newly generated vendor_files_to_check.patch.

+--------------------------+---------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+
| Type                     | Core                                                                                  | To Check                                                                                    |
+--------------------------+---------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+
| Preference               | vendor/magento/module-advanced-pricing-import-export/Model/Export/AdvancedPricing.php | Ampersand\Test\Model\Admin\Export\AdvancedPricing                                           |
| Preference               | vendor/magento/module-authorizenet/Model/Directpost.php                               | Ampersand\Test\Model\Admin\Directpost                                                       |
| Preference               | vendor/magento/module-authorizenet/Model/Directpost.php                               | Ampersand\Test\Model\Frontend\Directpost                                                    |
| Preference               | vendor/magento/module-authorizenet/Model/Directpost.php                               | Ampersand\Test\Model\Directpost                                                             |
| Plugin                   | vendor/magento/module-catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php  | Dotdigitalgroup\Email\Plugin\CatalogProductAttributeSavePlugin::afterExecute                |
| Plugin                   | vendor/magento/module-checkout/Block/Onepage.php                                      | Klarna\Kp\Plugin\Checkout\Block\OnepagePlugin::beforeGetJsLayout                            |
| Plugin                   | vendor/magento/module-checkout/Controller/Index/Index.php                             | Amazon\Login\Plugin\CheckoutController::afterExecute                                        |
| Override (phtml/js/html) | vendor/magento/module-checkout/view/frontend/web/template/summary/item/details.html   | app/design/frontend/Ampersand/theme/Magento_Checkout/web/template/summary/item/details.html |
| Override (phtml/js/html) | vendor/magento/module-customer/view/frontend/templates/account/dashboard/info.phtml   | app/design/frontend/Ampersand/theme/Magento_Customer/templates/account/dashboard/info.phtml |
| Override (phtml/js/html) | vendor/magento/module-customer/view/frontend/web/js/model/authentication-popup.js     | app/design/frontend/Ampersand/theme/Magento_Customer/web/js/model/authentication-popup.js   |
| Plugin                   | vendor/magento/module-multishipping/Controller/Checkout/Overview.php                  | Vertex\Tax\Model\Plugin\MultishippingErrorMessageSupport::beforeExecute                     |
| Plugin                   | vendor/magento/module-multishipping/Controller/Checkout/OverviewPost.php              | Vertex\Tax\Model\Plugin\MultishippingErrorMessageSupport::beforeExecute                     |
| Plugin                   | vendor/magento/module-reports/Model/ResourceModel/Product/Collection.php              | Dotdigitalgroup\Email\Plugin\ReportsProductCollectionPlugin::aroundAddViewsCount            |
| Plugin                   | vendor/magento/module-sales/Block/Adminhtml/Order/Create/Form.php                     | Vertex\Tax\Block\Plugin\OrderCreateFormPlugin::beforeGetOrderDataJson                       |
| Plugin                   | vendor/magento/module-sales/Model/Order/ShipmentDocumentFactory.php                   | Temando\Shipping\Plugin\Sales\Order\ShipmentDocumentFactoryPlugin::aroundCreate             |
| Override (phtml/js/html) | vendor/magento/module-sales/view/frontend/layout/sales_order_print.xml                | app/design/frontend/Ampersand/theme/Magento_Sales/layout/sales_order_print.xml              |
| Plugin                   | vendor/magento/module-sales-rule/Model/ResourceModel/Rule/Collection.php              | Dotdigitalgroup\Email\Plugin\RuleCollectionPlugin::afterSetValidationFilter                 |
| Plugin                   | vendor/magento/module-shipping/Controller/Adminhtml/Order/ShipmentLoader.php          | Temando\Shipping\Plugin\Shipping\Order\ShipmentLoaderPlugin::afterLoad                      |
| Override (phtml/js/html) | vendor/magento/module-ui/view/base/web/templates/block-loader.html                    | app/design/frontend/Ampersand/theme/Magento_Ui/web/templates/block-loader.html              |
+--------------------------+---------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+
You should review the above 19 items alongside /path/to/magento2/vendor_files_to_check.patch

Additional options

--auto-theme-update

php bin/patch-helper.php analyse /path/to/magento2/ --auto-theme-update 5

For template files the optional argument will automatically apply the changes to the local theme files.

The fuzz factor defines the level of strict comparing. With a fuzz factor of 0 only changes, where all lines of the context match, are applied. With a factor of 1 the first and the last line of the context is ignored. With a factor of n accordingly the first n and the last n lines. If a change could not be applied, a .rej file with the remaining changes is automatically created in the folder of the template file.

As it is recommended to check all changes afterwards anyway, a big fuzz factor can be chosen.

--vendor-namespaces

php bin/patch-helper.php analyse /path/to/magento2/ analyse --vendor-namespaces Ampersand,Amazon

This option allows you to filter the results to only the defined list of namespaces. Useful when you only care about overrides in your project namespace.

--sort-by-type

php bin/patch-helper.php analyse /path/to/magento2/ --sort-by-type

Sorts the output table by the type of override

Comments
  • Feature: new error types

    Feature: new error types "Queue consumer added" and "Queue consumer removed"

    In Magento updates often new queue consumers are added. In common server setups there is no automatic run for all consumers, so each needs to be configured separately. So its vital to detect new introduced consumers. This PR introduces this Feature.

    @convenient I gave my best in understanding the code and contributing, but if you see a way to improve the PR, feel free to do so :)

    Checklist

    • [x] Pull request has a meaningful description of its purpose
    • [x] All commits are accompanied by meaningful commit messages
    • [x] Tests have been ran / updated
    opened by a-dite 24
  • Test third party modules (fix issue #5)

    Test third party modules (fix issue #5)

    Fix issue #5

    Adds ability to use this when upgrading any dependency. In the test process I have added a module AmpersandVendorTest and have added a preference and an override for a template to it within AmpersandTest and the theme.

    This has had the effect that we can see the test module being flagged at https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/50/files?w=1#diff-133b164f15b2fb0ce3b815c485e7c74f359bffb1d7409f7f1969fed6060b94ea (best to avoid whitespace)

    This has had the following effect and we can see the test module overrides being flagged.

    A bit of a clearer example, I temporarily spoofed in some adyen overrides and got the following.

    The process is exactly the same, i did it this way in case a magento module requires a magento module to function. The best guarantee is to diff the whole vendor before and after, rather than trying to be too clever.

    +--------------------------+----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+
    | Type                     | Core                                                                                   | To Check                                                                                         |
    +--------------------------+----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+
    | Override (phtml/js/html) | vendor/adyen/module-payment/view/frontend/templates/checkout/success.phtml             | app/design/frontend/Ampersand/theme/Adyen_Payment/templates/checkout/success.phtml               |
    | Preference               | vendor/adyen/module-payment/AdminMessage/APIKeyMessage.php                             | Ampersand\Test\Model\AdyenAPIKeyMessage                                                          |
    +--------------------------+----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+
    

    Checklist

    • [x] Pull request has a meaningful description of its purpose
    • [x] All commits are accompanied by meaningful commit messages
    • [x] Tests have been ran / updated
    opened by convenient 19
  • Overriden frontend html files from inside 'web/template' directory isn't being detected yet

    Overriden frontend html files from inside 'web/template' directory isn't being detected yet

    Hi

    Big thanks for open sourcing this tool!

    If I compare it with the output of my own crappy script to detect changes between 2 different versions of Magento, I notice one difference when doing a diff in between Magento 2.2.6 and 2.2.7 for frontend overridden files.

    My script detects this file as overwritten in one of our projects, but this tool doesn't seem to support this yet: Magento_Checkout/web/template/summary/item/details.html (2.2.6 version vs 2.2.7 version)

    Would be nice if this tool could also detect such files.

    Thanks again! :)

    opened by hostep 19
  • Possibility to open three-file-diff viewer directly from the output

    Possibility to open three-file-diff viewer directly from the output

    Firstly: Thanks a lot for developing this awesome helper. We use it for every Magento update, and it makes our live so much easier! When I now have the output of which files I shall check, I get through them one by one and open the diff viewer between the override / preference and the Magento Core file. Sometimes, if I'm still not sure, if the changes are needed, I open the Core file in the vendor_orig folder and check out the three-file-diff. Do you see any good way of having that directly as a possibility? Maybe with a clickable link, which opens that view? I saw, that PHPStorm offers some CLI approach: https://www.jetbrains.com/help/phpstorm/command-line-differences-viewer.html For this, we would need the paths of all three files, which might be a bit difficult. What do you think?

    opened by norgeindian 15
  • Any way to make it not depend on a database?

    Any way to make it not depend on a database?

    We're currently exploring whether we can run this tool in a scheduled pipeline to automate these steps;

        - composer install
        - mv vendor vendor_orig
        - composer require magento/product-community-edition 2.4.1 --no-update
        - composer --profile update
        - bin/magento set:up
        - diff -ur vendor_orig/ vendor/ > vendor.patch
        - cd ampersand-magento2-upgrade-patch-helper
        - php bin/patch-helper.php analyse ../ --auto-theme-update 0 --sort-by-type ../patch-helper-output.txt
    

    This way, we could let our pipeline do the heavy lifting and commit the result to a separate branch, from where a developer can walk through the patch-helper-output.txt file. One of the things we're running into is that we need a database because the upgrade patch helper assumes a running Magento install. This isn't an issue per se, but we'd rather not. Is there any way we could make the patch helper run on just code, and no db?

    opened by peterjaap 12
  • Email template support

    Email template support

    When updating to 2.4.3p-2 and above, we noticed that the the tool did not show email template changes.

    For example, a change in vendor/magento/module-customer/view/frontend/email/password_reset_confirmation.html did not come up when using the tool. We have an overwrite on this template file and noticed we were missing a parameter only after we got an issue with the emails.

    Does this tool support email templates? If not, is the a plan to add it in the near future?

    opened by BorisovskiP 10
  • [WIP] Adds support for detecting overwritten custom frontend files on top o…

    [WIP] Adds support for detecting overwritten custom frontend files on top o…

    …f Hyvä themes.

    This is a very hacky way of adding support for Hyvä themes as a base theme.

    Currently this tool does not support detecting changes in custom themes build on top of Hyvä themes. For example, I was trying to upgrade Hyvä from one version to another and was hoping that this tool would help me figure out which overwritten files in our custom theme needed to be looked at. But currently the tool doesn't support this.

    The PR is in WIP status, because I'm like 99% sure this isn't the correct way of adding support for this.

    In fact, I believe there might be a bug in the tool which does currently not support base themes at all. Magento adds almost all their frontend files (xml, phtml, html, js) through modules and not through their blank or luma themes.

    There are currently only a few limited files that are interesting to this tool in their base themes and I think the tool currently is not able to analyse change in those files (not tested though), some numbers to demonstrate how few files are in those themes (the majority of files in those themes are less files):

    • 0 phtml files in Magento/blank
    • 0 html files in Magento/blank
    • 3 js files in Magento/blank
    • 5 xml files in Magento/blank
    • 2 phtml files in Magento/luma
    • 18 html files in Magento/luma
    • 0 js files in Magento/luma
    • 9 xml files in Magento/luma

    This is probably also why Hyvä themes aren't working out of the box since the 2 Hyvä themes (reset & default) do put all their frontend files inside the theme.

    I'm not sure what the best way would be to support this in a more generic way that can work with all themes and random file structures, and have not a lot of time to investigate this properly unfortunately.

    Checklist

    • [x] Pull request has a meaningful description of its purpose
    • [x] All commits are accompanied by meaningful commit messages
    • [ ] Tests have been ran / updated
    bug help wanted discussion 
    opened by hostep 9
  • Multiple levels of theme inheritance can hide an overwritten template file

    Multiple levels of theme inheritance can hide an overwritten template file

    Hi!

    Detected just now when analysing Magento 2.3.5-p2 upgrade (from 2.3.5-p1). Regarding the file vendor/magento/module-wishlist/view/frontend/templates/sidebar.phtml

    We have a particular project where the following theme inheritance is active:

    • Magento/blank
      • Vendor/blank (installed in vendor)
        • Vendor/custom (installed in app/design)

    The sidebar.phtml file is being overwritten in both Vendor themes:

    • vendor/vendor/blank/Magento_Wishlist/templates/sidebar.phtml
    • app/design/frontend/Vendor/custom/Magento_Wishlist/templates/sidebar.phtml

    When I run the analyse command, it only outputs:

    • app/design/frontend/Vendor/custom/Magento_Wishlist/templates/sidebar.phtml

    Is this expected? I think it should output both files?

    There is a possibility that one storeview uses one theme and another storeview uses the other theme and then we could have troubles if only one of both was patched.

    Thanks again for the awesome tool which I'm using all the time! :)

    bug help wanted 
    opened by hostep 7
  • Make into a magento2 module

    Make into a magento2 module

    I've seen on slack chats and have it mentioned to me a few times (most recently @pocallaghan) ) that it would be good to have this as a magento2 module.

    My initial thoughts on this were summarised here but I'll quote it for posterity

    I did previously think of making this a module that you install within Magento, but then dependencies with things like symfony/console which can vary between 2.1 and 2.3 quite drastically can cause problems.

    So i figured it would be less disruptive and more likely to work across wide version gaps it it was isolated.

    Basically, we have enough dependencies to work with when upgrading magento so I didn't want to have to worry about one more. Also we usually have multiple magento versions to support (for example now its 2.3.x and 2.4.x)

    In that issue @hostep identified that workarounds are possible

    As a developer I am pretty risk averse which is why I have never really pushed forward on this. But if there's an appetite for it and people think it would be useful I'm open for discussion and PRs :)

    I was snooping about in the github insights feature and found this in which a @AW3i started work on this last year https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/compare/master...AW3i:check-custom-modules

    enhancement help wanted discussion 
    opened by convenient 6
  • Detect intercepted methods being modified

    Detect intercepted methods being modified

    This was a pretty large refactor for #6

    • This required changes in how the warnings were handled as now we needed to detect both preferences, and plugins for a php class.
      • I've amalgamated the output together as one large table to keep the code clean as additional checks are added in the future.
      • This required the magento2 specific dependencies to be better encapsulated to prevent instantiation.
    • This required that the patch entry could be consumable and parsable, so that we could understand where in the original/new files php changes occurred, and what function they belonged to.
    • To aid the manual review of the patchfile with the values output in the table a subsection of the patchfile is written to vendor_files_to_check.patch, otherwise the massive vendor.patch would have to be inspected by the developer during the upgrade manually.
    • Unit tests and functional tests have been split out.

    This outputs information in the table like follows

    +--------------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+
    | Type                     | Core                                                                                                  | To Check                                                                                                       |
    +--------------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+
    | Plugin                   | vendor/magento/module-catalog-search/Controller/Result/Index.php                                      | Smile\ElasticsuiteCatalog\Plugin\CatalogSearch\ResultPlugin::aroundExecute                                     |
    | Preference               | vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php                      | Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection                                      |
    +--------------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+
    You should review the above 2 items alongside /Users/lukerodgers/src/example/vendor_files_to_check.patch
    

    TODO

    • [x] Tidy spaghetti code 🍝
    • [x] --sort-by-type
    • [x] Test

    Checklist

    • [x] Pull request has a meaningful description of its purpose
    • [x] All commits are accompanied by meaningful commit messages
    • [x] Tests have been ran / updated
    opened by convenient 6
  • Issue in bootstrapping Magento with 2.3.6-p1

    Issue in bootstrapping Magento with 2.3.6-p1

    Hiya

    When trying to run this tool when analysing an upgrade from Magento 2.3.6 to 2.3.6-p1, I'm getting the following error:

    $ bin/patch-helper.php analyse /some-project -vvv
    
    In PhpCookieManager.php line 397:
    
      [Magento\Framework\Stdlib\Cookie\FailureToSendException]
      The cookie with "private_content_version" cookieName couldn't be sent. Please try again later.
    
    
    Exception trace:
     () at /some-project/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php:397
     Magento\Framework\Stdlib\Cookie\PhpCookieManager->setCookieSameSite() at /some-project/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php:183
     Magento\Framework\Stdlib\Cookie\PhpCookieManager->setCookie() at /some-project/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php:135
     Magento\Framework\Stdlib\Cookie\PhpCookieManager->setPublicCookie() at /some-project/vendor/magento/framework/App/PageCache/Version.php:87
     Magento\Framework\App\PageCache\Version->process() at /some-project/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:67
     Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch() at /some-project/vendor/magento/framework/Interception/Interceptor.php:135
     Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() at /some-project/vendor/magento/framework/Interception/Interceptor.php:153
     Magento\Framework\App\FrontController\Interceptor->___callPlugins() at /some-project/generated/code/Magento/Framework/App/FrontController/Interceptor.php:26
     Magento\Framework\App\FrontController\Interceptor->dispatch() at /some-project/vendor/magento/framework/App/Http.php:116
     Magento\Framework\App\Http->launch() at src/Ampersand/PatchHelper/Helper/Magento2Instance.php:74
     Ampersand\PatchHelper\Helper\Magento2Instance->__construct() at src/Ampersand/PatchHelper/Command/AnalyseCommand.php:54
     Ampersand\PatchHelper\Command\AnalyseCommand->execute() at vendor/symfony/console/Command/Command.php:255
     Symfony\Component\Console\Command\Command->run() at vendor/symfony/console/Application.php:953
     Symfony\Component\Console\Application->doRunCommand() at vendor/symfony/console/Application.php:248
     Symfony\Component\Console\Application->doRun() at vendor/symfony/console/Application.php:148
     Symfony\Component\Console\Application->run() at bin/patch-helper.php:10
    
    analyse [-a|--auto-theme-update [AUTO-THEME-UPDATE]] [--sort-by-type] [--vendor-namespaces [VENDOR-NAMESPACES]] [--php-strict-errors] [--] <project>
    

    If you haven't got access yet to Magento 2.3.6-p1, it will be released to the public on 9 February.

    It looks like Magento gets bootstrapped in a http context by this tool and Magento 2.3.6-p1 comes with support for SameSite cookies and while it tries to set it, it causes an error because it's not an actually http request, if I understand it correctly.

    Not sure if the error is in this tool or a new bug in Magento 2.3.6-p1

    opened by hostep 5
  • Fix theme handling and Hyva compatibility improvements

    Fix theme handling and Hyva compatibility improvements

    First change is to ensure that themes are properly checkable, not sure exactly when this regressed but likely https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/50/files#diff-1677a5ff5bacd5ace1e65ee7fb17d5a6875c82d8f0e747f0df8cde8e80cc0050R508

    I've captured test cases to ensure that core magento theme files are handled, as well as custom themes residing in vendor are checked.

    + | WARN  | Override (phtml/js/html) | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Checkout/templates/cart/form.phtml | app/design/frontend/Ampersand/theme/Magento_Checkout/templates/cart/form.phtml                 |
    + | WARN  | Override (phtml/js/html) | vendor/magento/module-sales/view/frontend/email/order_new.html                                         | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Sales/email/order_new.html |
    + | WARN  | Override (phtml/js/html) | vendor/magento/theme-frontend-luma/Magento_Sales/email/order_new.html                                  | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Sales/email/order_new.html |
    

    The second change is to improve output for hyva themes.

    If a template is a "hyva owned" template (it is defined in a theme with Hyva/ in the name) then we do not care that Magento had modified a template of the same path structure for any of the hyva themes or children themes. By checking if the template is defined in one of the base hyva themes, we roughly handle the case where theme fallback is in play as if a vendor/magento/some/template.phtml file is scanned and does not exist in the hyva themes, but exists in a child theme, it will still be reported.

    We only need to see the hyva children themes being reported, when changes to the hyva base themes themselves occur. So we filter output, and ensure reporting is a bit like below.

    - | WARN  | Override (phtml/js/html) | vendor/magento/module-customer/view/frontend/templates/address/edit.phtml                              | vendor/hyva-themes/magento2-default-theme/Magento_Customer/templates/address/edit.phtml       | 
    - | WARN  | Override (phtml/js/html) | vendor/magento/module-customer/view/frontend/templates/address/edit.phtml                              | app/design/frontend/OurCustomer/Hyvaaaaa/Magento_Customer/templates/address/edit.phtml        | 
    + | WARN  | Override (phtml/js/html) | vendor/hyva-themes/magento2-default-theme/Magento_Customer/templates/address/edit.phtml                | app/design/frontend/OurCustomer/Hyvaaaaa/Magento_Customer/templates/address/edit.phtml        | 
    

    This works inversely also, changes in hyva themes in vendor will not be reported in non-hyva based app/code themes.

    This filtering in its total form removes these kinds of entries which I believe makes sense

    -| WARN  | Override (phtml/js/html) | vendor/ampersand/upgrade-patch-helper-test-hyva-theme-stub/theme/Magento_Checkout/templates/cart/form.phtml | app/design/frontend/Ampersand/theme/Magento_Checkout/templates/cart/form.phtml                                  |
    -| WARN  | Override (phtml/js/html) | vendor/ampersand/upgrade-patch-helper-test-hyva-theme-stub/theme/Magento_Checkout/templates/cart/form.phtml | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Checkout/templates/cart/form.phtml          |
    -| WARN  | Override (phtml/js/html) | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Checkout/templates/cart/form.phtml      | vendor/ampersand/upgrade-patch-helper-test-hyva-theme-extended/theme/Magento_Checkout/templates/cart/form.phtml |
    -| WARN  | Override (phtml/js/html) | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Checkout/templates/cart/form.phtml      | vendor/ampersand/upgrade-patch-helper-test-hyva-theme-stub/theme/Magento_Checkout/templates/cart/form.phtml     |
    

    TODO

    • [x] Add hyva test cases

    Checklist

    • [x] Pull request has a meaningful description of its purpose
    • [x] All commits are accompanied by meaningful commit messages
    • [x] Tests have been ran / updated
    opened by convenient 19
  • Test scoped graphql plugin/preferences

    Test scoped graphql plugin/preferences

            $configLoader = $objectManager->get(\Magento\Framework\ObjectManager\ConfigLoaderInterface::class);
            $this->areaConfig['adminhtml'] = $configLoader->load('adminhtml');
            $this->areaConfig['frontend'] = $configLoader->load('frontend');
            $this->areaConfig['global'] = $configLoader->load('global');
    

    Not sure what i was originally thinking, but we should verify if we're missing out on preferences in other areas pretty easily.

    help wanted 
    opened by convenient 0
  • Improvements with Hyva themes

    Improvements with Hyva themes

    For a while now, https://hyva.io/ is used more and more, and we use it in some projects as well. There it would be awesome, if some parts could be improved:

    • Ignore overrides in hyva modules as these are maintained by hyva itself anyway and we don't want to adapt them in an update
    • Check also custom fallback themes: In hyva it is possible to define a fallback theme for specific URLs. For that, there is a config setting, where you provide a full path of a fallback theme. This theme is currently not taken into account as far as I see, as it is not defined as a "normal" theme and so ignored. Would be awesome, if this could be checked as well.

    Do you see any way of approaching this?

    help wanted 
    opened by norgeindian 11
  • Notify when system.xml changes

    Notify when system.xml changes

    Work similar to https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/67 could be done to actually analyse when config values are added or deleted to magento.

    Might be useful information although it may be a deluge to have by default, so maybe hidden behind a flag would be useful

    Context

    Maybe similar logic can be used for discovering changes in other type of xml files (like adminhtml/system.xml to see if configuration settings were added/removed). Just an idea, not sure if really helpful https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/67#issuecomment-1234667780

    neat idea @hostep this kind of thing is definitely now possible, but I wonder how much noise we'd get for how much value? I fear the payment methods and third party modules magento bundles / unbundles would cause this to be loud? 🤔 https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/67#issuecomment-1235230159

    True, but the behavior could maybe be hidden behind a flag? --also-show-config-changes (I'm bad at naming things, so this is probably not the best option) https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/67#issuecomment-1235316206

    help wanted 
    opened by convenient 0
  • wrong default

    wrong default "override" in some cases

    according this report https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/issues/59#issuecomment-926707217

    matching against the module correctly for this override, but matching the end of default.xml when i should be looking for /default.xml very likely.

    help wanted 
    opened by onlinebizsoft 0
  • the report show 0 items

    the report show 0 items

    For some reasons I couldn't get it working

    • At first, I wanted to make a quick check on report of preference, plugin, PHTML/HTML/JS but an empty vendor.patch doesn't work so I have made a test modification and generate a non-empty vendor.patch so it can pass the validation for vendor.patch
    • Now I get the empty report You should review the above 0 items alongside /path/to/magento/vendor_files_to_check.patch (the Magento installation is a fully working test site and has database connection)

    Where should I look at? My site is 2.4.3 and I have the magefan conflict detector working well.

    wontfix discussion 
    opened by onlinebizsoft 6
Releases(v1.14.0)
  • v1.14.0(Nov 28, 2022)

    What's Changed

    • New INFO for setup scripts/patches by @convenient in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/82

    Full Changelog: https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/compare/v1.13.0...v1.14.0

    Source code(tar.gz)
    Source code(zip)
  • v1.13.0(Nov 19, 2022)

    What's Changed

    • Refactor and unit tests by @convenient in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/79

    Full Changelog: https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/compare/v1.12.0...v1.13.0

    Source code(tar.gz)
    Source code(zip)
  • v1.12.0(Nov 14, 2022)

    What's Changed

    • Add WARN/INFO levels, detect db_schema.xml changes https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/74
    • Install PHPCS and phpstan by @convenient in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/78

    Full Changelog: https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/compare/v1.11.2...v1.12.0

    Source code(tar.gz)
    Source code(zip)
  • v1.11.2(Oct 25, 2022)

    What's Changed

    • Test 2.4.5-p1 by @convenient in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/73

    Full Changelog: https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/compare/v1.11.1...v1.11.2

    Source code(tar.gz)
    Source code(zip)
  • v1.11.1(Oct 12, 2022)

    What's Changed

    • Improve when running without database, scan phtml and js files, and increase CI strictness by @convenient in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/72

    Full Changelog: https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/compare/v1.11.0...v1.11.1

    Source code(tar.gz)
    Source code(zip)
  • v1.11.0(Oct 10, 2022)

    What's Changed

    • Add --phpstorm-threeway-diff-commands flag by @convenient in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/71

    Full Changelog: https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/compare/v1.10.1...v1.11.0

    Source code(tar.gz)
    Source code(zip)
  • v1.10.1(Sep 29, 2022)

    What's Changed

    • Support changed consumers by @convenient in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/69

    Full Changelog: https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/compare/v1.10.0...v1.10.1

    Source code(tar.gz)
    Source code(zip)
  • v1.10.0(Sep 2, 2022)

    What's Changed

    • Configure composer allow plugins by @convenient in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/66
    • Feature: new error types "Queue consumer added" and "Queue consumer removed" by @a-dite in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/67

    New Contributors

    • @a-dite made their first contribution in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/67

    Full Changelog: https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/compare/v1.9.1...v1.10.0

    Source code(tar.gz)
    Source code(zip)
  • v1.9.1(Jun 13, 2022)

    What's Changed

    • Add test case and detection support for email templates by @convenient in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/65

    Full Changelog: https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/compare/v1.9.0...v1.9.1

    Source code(tar.gz)
    Source code(zip)
  • v1.9.0(Jun 13, 2022)

    What's Changed

    • Update .travis.yml by @convenient in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/61
    • Update test suites to run in docker containers, php 8.1 support by @convenient in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/64

    Full Changelog: https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/compare/v1.8.4...v1.9.0

    Source code(tar.gz)
    Source code(zip)
  • v1.8.4(Jun 3, 2021)

    • https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/57
    • https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/56
    • fix handling of relative paths in output
    • thanks @pocallaghan
    Source code(tar.gz)
    Source code(zip)
  • v1.8.3(Apr 1, 2021)

    • https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/55
    • Prevent redundant preferences being reported for third party modules
    Source code(tar.gz)
    Source code(zip)
  • v1.8.2(Apr 1, 2021)

  • v1.8.1(Mar 23, 2021)

    • Safer handling of polyfill functions
    • https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/52
    • Doesnt change this module in itself, but useful if you're including it in another symfony console module
    Source code(tar.gz)
    Source code(zip)
  • v1.8.0(Mar 16, 2021)

    • https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/50
    • Add support for testing non magento core modules, so this will test third party modules
    Source code(tar.gz)
    Source code(zip)
  • 1.7.3(Feb 2, 2021)

  • 1.7.2(Oct 30, 2020)

    • Fix bug where the tool throws an exception when you have no custom themes defined. This is more common now with PWA
    • Raised in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/issues/40
    • Fixed in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/41
    Source code(tar.gz)
    Source code(zip)
  • 1.7.1(Oct 22, 2020)

    • Fix bug where tool exits with 0 code, no errors, and no output
    • https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/39
    Source code(tar.gz)
    Source code(zip)
  • 1.7.0(Oct 13, 2020)

    • Allow you to stack on additional diff params so long as -ur appears.
    • When debugging a failed test it was a pain because the vendor.patch was overwritten for some test cases, this makes a backup and restores after each test.
    • Add --php-strict-errors flag so that any warnings / notices / anything else will turn into an exception. This is useful for test cases and debugging.
    • Capture #35 in a test and fix in https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/37
    Source code(tar.gz)
    Source code(zip)
  • v1.6.1(Sep 24, 2020)

  • v1.6.0(Aug 3, 2020)

  • v1.5.0(Jul 31, 2020)

    • Add a licence
    • Add option to filter namespace
    • Update php requirements in composer.json
    • Fix bug where multiple themes weren't being scanned
    Source code(tar.gz)
    Source code(zip)
  • v1.4.2(May 7, 2020)

  • v1.4.1(Oct 17, 2019)

  • v1.4.0(Mar 29, 2019)

  • v1.3.0(Jan 31, 2019)

  • v1.2.1(Dec 7, 2018)

  • v1.2.0(Dec 6, 2018)

    • Scan for knockout html overrides
    • https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/issues/1
    • https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/pull/4
    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(Dec 6, 2018)

  • v1.1.0(Dec 4, 2018)

    • Add scans for preferences in frontend/adminhtml scopes
    • https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/commit/c0fb016e660fbdd6ce148163d131737aaf0da7ff
    Source code(tar.gz)
    Source code(zip)
Owner
Ampersand
We architect & deliver retail technology solutions that create better customer experiences and positive operational change.
Ampersand
Magento 2 Extension to cleanup admin menu and Store > Configuration area by arranging third party extension items.

Clean Admin Menu - Magento 2 Extension It will merge all 3rd party extension's menu items in backend's primary menu to a common menu item named "Exten

RedChamps 109 Jan 3, 2023
An all-in-one package with the minimum third-party requirements to get started as quickly as possible with Pokemod Atlas

Pokemod Atlas All-In-One An all-in-one package with the minimum third-party requirements to get started as quickly as possible with Pokemod Atlas. ❤️

Pokemod 12 Oct 10, 2022
PHP script for detecting browser details

Browser-details PHP script for detecting Your IP Address / Hostname, Browser/Computer Properties and Browser Headers. (Works with PHP 4, PHP 5, PHP 7,

Szerver.hu 5 Oct 15, 2022
Installable com_content/category overrides with configuration settings to create card layouts

Installable com_content/caregory overrides with configuration settings to create card layouts. Uses default bootstrap css only.

Brian Teeman 10 Jan 5, 2023
A first party module to integrate Elastic App Search in Magento 2.

A first-party Magento integration for building excellent, relevant search experiences with Elastic App Search. ⚠️ This is a beta version of the client

elastic 25 Apr 22, 2022
A collection of command-line utilities to aid in debugging browser engines.

Browser debug utilities This project contains several scripts that make the process of debugging browser engines much easier (some special cases excep

Clay Freeman 5 May 29, 2023
Magento 2 Grid Colors module for colorizing admin grids. Supports saving of states with the help of grid's bookmarks.

Magento 2 Grid Colors Overview The module adds extra coloring features to admin grids at the Sales section. With help of this module, it is possible t

Dmitry Shkoliar 58 Dec 8, 2022
Magento 2 Debug Helper Module for easy debugging with Xdebug and PHPStorm or any other IDE

Magento 2 Debug Helper Information and Usage Magento 2 Debug Helper Module usage with PHPStorm and Xdebug Installation To install the Magento 2 Debug

Dmitry Shkoliar 13 May 24, 2022
Pimcore Bundle that enbable pimcore to expose webook for communication to third parties

WebHookBundle Plugin This extention provide an easy way to send dataobjects to an external sites via json, whenever a pimcore event occurs on a specif

Sintra  - Digital Business 22 Aug 9, 2022
Magento-bulk - Bulk Import/Export helper scripts and CLI utilities for Magento Commerce

Magento Bulk Bulk operations for Magento. Configuration Copy config.php.sample to config.php and edit it. Product Attribute Management List All Attrib

Bippo Indonesia 23 Dec 20, 2022
Magento 2 Module Experius Page Not Found 404. This module saves all 404 url to a database table

Magento 2 Module Experius Page Not Found 404 This module saves all 404 urls to a database table. Adds an admin grid with 404s It includes a count so y

Experius 28 Dec 9, 2022
VoteSwiper helps citizens to find a political party that matches their own views in a playful way.

VoteSwiper / WahlSwiper - Website VoteSwiper (in Germany better known as WahlSwiper) is a cross-platform voting advice app for Android, iOS and web br

MOVACT 9 Aug 15, 2022
Revived of weareblahs/unifi-tv. Watch free channels by unifi TV on any 3rd party IPTV players that support MPEG-DASH + Widevine!

unifi-tv-revived Revived of weareblahs/unifi-tv. Watch free channels by unifi TV on any 3rd party IPTV players that support MPEG-DASH + Widevine! What

Sam Sam 6 Jun 14, 2022
Snuffleupagus is a PHP 7+ and 8+ module designed to drastically raise the cost of attacks against websites, by killing entire bug classes

Snuffleupagus is a PHP 7+ and 8+ module designed to drastically raise the cost of attacks against websites, by killing entire bug classes

Julien Voisin 625 Jan 3, 2023
Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Strategery 123 Nov 20, 2021
All PHP functions, rewritten to throw exceptions instead of returning false, now for php8

A set of core PHP functions rewritten to throw exceptions instead of returning false when an error is encountered.

TheCodingMachine 106 Nov 21, 2022
now you can save MentionedMessage in UI

General now you can save MentionedMessage in UI Example: You Chat Hi @MulqiGaming @Friends it will be save Message later to MulqiGaming and Friends Co

MulqiGaming64 3 Aug 9, 2022