Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/poc-meaningful-semantic-understa…
Browse files Browse the repository at this point in the history
…nding-of-file-changes' into poc-meaningful-semantic-understanding-of-file-changes-xml
  • Loading branch information
convenient committed Nov 3, 2023
2 parents 76607ea + 7c6bb63 commit 85ee360
Show file tree
Hide file tree
Showing 16 changed files with 182 additions and 22 deletions.
2 changes: 2 additions & 0 deletions dev/Docker/setup-magento-with-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ echo "<!-- --><p>some change</p>" >> vendor/magento/module-ui/view/base/web/tem
# Redundant override
echo " " >> vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Ui/web/templates/redundant.html
echo " " >> vendor/ampersand/upgrade-patch-helper-test-module/src/module/view/frontend/email/redundant.html
echo " " >> vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Checkout/web/js/redundant.js

# Ignored change
echo "<!-- -->" >> vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Ui/web/templates/ignore.html
echo "<!-- -->" >> vendor/ampersand/upgrade-patch-helper-test-module/src/module/view/frontend/email/ignore.html
echo "/* some comment */" >> vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Checkout/web/js/ignore.js

echo "#" >> vendor/magento/module-customer/view/frontend/web/js/model/authentication-popup.js

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Some copyright header.
* Goes here
*
*
* foobar
*/
define([
'abc123'
], function (resolver) {
'use strict';

/**
* Some function comment.
*
* @param {Object} config - Optional configuration
*/
function the_function_names_are_different(config) {
// this has been overridden and the function is different now
var foo = 1;
}

/**
* Some other function comment
*
* @param {Object} config - Optional configuration
*/
function init(config) {
resolver(the_function_names_are_different.bind(config));
}

return init;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* Some copyright header.
* Goes here
*/
define([
'abc123'
], function (resolver) {
'use strict';

/**
* Some function comment.
*
* @param {Object} config - Optional configuration
*/
function foobar(config) {
var foo = 1;
}


/**
* what comments // do we have here
* /*
*
* oh what comments are here
* /
*/


/**
* Some other function comment
*
* @param {Object} config - Optional configuration
*/
function init(config) {
resolver(foobar.bind(config));
}
// more comments

return init;
});
29 changes: 29 additions & 0 deletions dev/TestVendorModule/src/theme/Magento_Checkout/web/js/ignore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Some copyright header.
* Goes here
*/
define([
'abc123'
], function (resolver) {
'use strict';

/**
* Some function comment.
*
* @param {Object} config - Optional configuration
*/
function this_is_the_base_function_name(config) {
var foo = 1;
}

/**
* Some other function comment
*
* @param {Object} config - Optional configuration
*/
function init(config) {
resolver(this_is_the_base_function_name.bind(config));
}

return init;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Some copyright header.
* Goes here
*/
define([
'abc123'
], function (resolver) {
'use strict';


// more comments
/*
like this
*/
/**
* Some function comment.
*
* @param {Object} config - Optional configuration
*/
function foobar(config) {
var foo = 1;
}

// more comments

/**
* Some other function comment
*
* @param {Object} config - Optional configuration
*/
function init(config) {
resolver(foobar.bind(config));
}

return init;
});
5 changes: 3 additions & 2 deletions dev/phpunit/functional/expected_output/magentom23.out.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@
| WARN | Preference Removed | vendor/ampersand/upgrade-patch-helper-test-module/src/module/Model/ToPreferenceAndDelete.php | Ampersand\Test\Model\ToPreferenceAndDelete |
| WARN | Preference Removed | vendor/ampersand/upgrade-patch-helper-test-module/src/module/Model/ToPreferenceAndExtendAndDelete.php | Ampersand\Test\Model\ToPreferenceAndExtendAndDelete |
| WARN | Redundant Override | vendor/ampersand/upgrade-patch-helper-test-module/src/module/view/frontend/email/redundant.html | app/design/frontend/Ampersand/theme/Ampersand_TestVendor/email/redundant.html |
| WARN | Redundant Override | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Checkout/web/js/redundant.js | app/design/frontend/Ampersand/theme/Magento_Checkout/web/js/redundant.js |
| WARN | Redundant Override | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Ui/web/templates/redundant.html | app/design/frontend/Ampersand/theme/Magento_Ui/web/templates/redundant.html |
+-------+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
WARN count: 64
WARN count: 65
INFO count: 309 (to view re-run this tool with --show-info)
IGNORE count: 2 (to view re-run this tool with --show-ignore)
IGNORE count: 3 (to view re-run this tool with --show-ignore)
For docs on each check see https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/blob/master/docs/CHECKS_AVAILABLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@
| WARN | Preference Removed | vendor/ampersand/upgrade-patch-helper-test-module/src/module/Model/ToPreferenceAndDelete.php | Ampersand\Test\Model\ToPreferenceAndDelete |
| WARN | Preference Removed | vendor/ampersand/upgrade-patch-helper-test-module/src/module/Model/ToPreferenceAndExtendAndDelete.php | Ampersand\Test\Model\ToPreferenceAndExtendAndDelete |
| WARN | Redundant Override | vendor/ampersand/upgrade-patch-helper-test-module/src/module/view/frontend/email/redundant.html | app/design/frontend/Ampersand/theme/Ampersand_TestVendor/email/redundant.html |
| WARN | Redundant Override | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Checkout/web/js/redundant.js | app/design/frontend/Ampersand/theme/Magento_Checkout/web/js/redundant.js |
| WARN | Redundant Override | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Ui/web/templates/redundant.html | app/design/frontend/Ampersand/theme/Magento_Ui/web/templates/redundant.html |
+-------+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
WARN count: 65
WARN count: 66
INFO count: 314 (to view re-run this tool with --show-info)
IGNORE count: 2 (to view re-run this tool with --show-ignore)
IGNORE count: 3 (to view re-run this tool with --show-ignore)
For docs on each check see https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/blob/master/docs/CHECKS_AVAILABLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@
| WARN | 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 |
| WARN | 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 |
| WARN | Override (phtml/js/html) | vendor/magento/module-ui/view/base/web/templates/grid/masonry.html | app/design/frontend/Ampersand/theme/Magento_Ui/web/templates/grid/masonry.html |
| WARN | Override (phtml/js/html) | vendor/magento/module-vault/view/frontend/web/js/view/payment/method-renderer/vault.js | app/design/frontend/Ampersand/theme/Magento_Vault/web/js/view/payment/method-renderer/vault.js |
| WARN | Override (phtml/js/html) | vendor/magento/theme-frontend-blank/etc/view.xml | vendor/ampersand/upgrade-patch-helper-test-hyva-fallback-theme/theme/etc/view.xml |
| WARN | Override (phtml/js/html) | vendor/magento/theme-frontend-blank/etc/view.xml | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/etc/view.xml |
| 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 |
| WARN | Override (phtml/js/html) | vendor/magento/theme-frontend-luma/etc/view.xml | vendor/ampersand/upgrade-patch-helper-test-hyva-fallback-theme/theme/etc/view.xml |
| WARN | Override (phtml/js/html) | vendor/magento/theme-frontend-luma/etc/view.xml | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/etc/view.xml |
| WARN | Override (phtml/js/html) | vendor/paypal/module-braintree-core/view/base/web/js/form-builder.js | vendor/paypal/module-braintree-core/view/frontend/web/js/form-builder.js |
| WARN | Plugin | vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php | Ampersand\Test\Plugin\PhpCookieManager::beforeSetPublicCookie |
| WARN | Plugin | vendor/magento/module-adobe-ims/Model/UserProfile.php | Ampersand\Test\Plugin\AdobeImsUserProfile::afterGetUpdatedAt |
| WARN | Plugin | vendor/magento/module-adobe-ims/Model/UserProfile.php | Ampersand\Test\Plugin\AdobeImsUserProfile::aroundGetUpdatedAt |
Expand All @@ -60,9 +58,11 @@
| WARN | Preference Removed | vendor/ampersand/upgrade-patch-helper-test-module/src/module/Model/ToPreferenceAndDelete.php | Ampersand\Test\Model\ToPreferenceAndDelete |
| WARN | Preference Removed | vendor/ampersand/upgrade-patch-helper-test-module/src/module/Model/ToPreferenceAndExtendAndDelete.php | Ampersand\Test\Model\ToPreferenceAndExtendAndDelete |
| WARN | Redundant Override | vendor/ampersand/upgrade-patch-helper-test-module/src/module/view/frontend/email/redundant.html | app/design/frontend/Ampersand/theme/Ampersand_TestVendor/email/redundant.html |
| WARN | Redundant Override | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Checkout/web/js/redundant.js | app/design/frontend/Ampersand/theme/Magento_Checkout/web/js/redundant.js |
| WARN | Redundant Override | vendor/ampersand/upgrade-patch-helper-test-module/src/theme/Magento_Ui/web/templates/redundant.html | app/design/frontend/Ampersand/theme/Magento_Ui/web/templates/redundant.html |
| WARN | Redundant Override | vendor/paypal/module-braintree-core/view/base/web/js/form-builder.js | vendor/paypal/module-braintree-core/view/frontend/web/js/form-builder.js |
+-------+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
WARN count: 60
INFO count: 395 (to view re-run this tool with --show-info)
IGNORE count: 2 (to view re-run this tool with --show-ignore)
IGNORE count: 4 (to view re-run this tool with --show-ignore)
For docs on each check see https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper/blob/master/docs/CHECKS_AVAILABLE.md
Loading

0 comments on commit 85ee360

Please sign in to comment.