From d3111d2985cf5c7c82a4c0241011d785b1dc0789 Mon Sep 17 00:00:00 2001 From: luigifab <31816829+luigifab@users.noreply.github.com> Date: Fri, 16 Jun 2023 22:44:36 +0200 Subject: [PATCH 1/6] Replaced prototypejs load event with vanilla js in js/mage/adminhtml/input-counter.js (#3311) Co-authored-by: Fabrizio Balliano --- js/mage/adminhtml/input-counter.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/mage/adminhtml/input-counter.js b/js/mage/adminhtml/input-counter.js index aa74e3ffabd..1a690684468 100644 --- a/js/mage/adminhtml/input-counter.js +++ b/js/mage/adminhtml/input-counter.js @@ -1,5 +1,4 @@ -// https://stackoverflow.com/a/44436408/5703627 -document.observe('dom:loaded', function() { +window.addEventListener('DOMContentLoaded', function() { Element.addMethods({ // setup once, memorize the counter element and maxLen prepare_for_countdown: function(element) { From a3598b89a947700cc1df581ad1a94ebcd91b8c83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 07:31:12 +0100 Subject: [PATCH 2/6] Bump phpstan/phpstan from 1.10.18 to 1.10.19 (#3332) --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 1b9d808a397..83c26a265f4 100644 --- a/composer.lock +++ b/composer.lock @@ -3368,16 +3368,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.18", + "version": "1.10.19", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "52b6416c579663eebdd2f1d97df21971daf3b43f" + "reference": "af5a296ff02610c1bfb4ddfac9fd4a08657b9046" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/52b6416c579663eebdd2f1d97df21971daf3b43f", - "reference": "52b6416c579663eebdd2f1d97df21971daf3b43f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/af5a296ff02610c1bfb4ddfac9fd4a08657b9046", + "reference": "af5a296ff02610c1bfb4ddfac9fd4a08657b9046", "shasum": "" }, "require": { @@ -3426,7 +3426,7 @@ "type": "tidelift" } ], - "time": "2023-06-07T22:00:43+00:00" + "time": "2023-06-14T15:26:58+00:00" }, { "name": "phpunit/php-code-coverage", From 9ad672bc1b64d6d2f77202d10365d34136d461c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 07:31:35 +0100 Subject: [PATCH 3/6] Bump phpseclib/phpseclib from 3.0.19 to 3.0.20 (#3333) --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 83c26a265f4..cb0ccb27208 100644 --- a/composer.lock +++ b/composer.lock @@ -772,16 +772,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.19", + "version": "3.0.20", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "cc181005cf548bfd8a4896383bb825d859259f95" + "reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cc181005cf548bfd8a4896383bb825d859259f95", - "reference": "cc181005cf548bfd8a4896383bb825d859259f95", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67", + "reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67", "shasum": "" }, "require": { @@ -862,7 +862,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.19" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.20" }, "funding": [ { @@ -878,7 +878,7 @@ "type": "tidelift" } ], - "time": "2023-03-05T17:13:09+00:00" + "time": "2023-06-13T06:30:34+00:00" }, { "name": "psr/container", From 8f3bbb50ddec9dcd7de48880ca9b99b6f94ce681 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 07:32:02 +0100 Subject: [PATCH 4/6] Bump friendsofphp/php-cs-fixer from 3.17.0 to 3.18.0 (#3334) --- composer.lock | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index cb0ccb27208..96c36715bdc 100644 --- a/composer.lock +++ b/composer.lock @@ -2469,25 +2469,29 @@ }, { "name": "doctrine/deprecations", - "version": "v1.0.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -2506,9 +2510,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" }, - "time": "2022-05-02T15:47:09+00:00" + "time": "2023-06-03T09:27:29+00:00" }, { "name": "doctrine/instantiator", @@ -2660,16 +2664,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.17.0", + "version": "v3.18.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "3f0ed862f22386c55a767461ef5083bddceeed79" + "reference": "b123395c9fa3a70801f816f13606c0f3a7ada8df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3f0ed862f22386c55a767461ef5083bddceeed79", - "reference": "3f0ed862f22386c55a767461ef5083bddceeed79", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/b123395c9fa3a70801f816f13606c0f3a7ada8df", + "reference": "b123395c9fa3a70801f816f13606c0f3a7ada8df", "shasum": "" }, "require": { @@ -2744,7 +2748,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.17.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.18.0" }, "funding": [ { @@ -2752,7 +2756,7 @@ "type": "github" } ], - "time": "2023-05-22T19:59:32+00:00" + "time": "2023-06-18T22:25:45+00:00" }, { "name": "macopedia/phpstan-magento1", From 2dad20ca0b2345267d7c52090308f216e649e41a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 07:32:31 +0100 Subject: [PATCH 5/6] Bump macopedia/phpstan-magento1 from 1.0.5 to 1.0.7 (#3335) --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 96c36715bdc..b05ff4c2290 100644 --- a/composer.lock +++ b/composer.lock @@ -2760,16 +2760,16 @@ }, { "name": "macopedia/phpstan-magento1", - "version": "v1.0.5", + "version": "v1.0.7", "source": { "type": "git", "url": "https://github.com/macopedia/phpstan-magento1.git", - "reference": "69346472b19422b2aefeb928d6488b5d907e8b1d" + "reference": "348ab687063bdd78c571091a16b0865935798b18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/macopedia/phpstan-magento1/zipball/69346472b19422b2aefeb928d6488b5d907e8b1d", - "reference": "69346472b19422b2aefeb928d6488b5d907e8b1d", + "url": "https://api.github.com/repos/macopedia/phpstan-magento1/zipball/348ab687063bdd78c571091a16b0865935798b18", + "reference": "348ab687063bdd78c571091a16b0865935798b18", "shasum": "" }, "require": { @@ -2793,9 +2793,9 @@ "description": "Extension for PHPStan to allow analysis of Magento 1 code.", "support": { "issues": "https://github.com/macopedia/phpstan-magento1/issues", - "source": "https://github.com/macopedia/phpstan-magento1/tree/v1.0.5" + "source": "https://github.com/macopedia/phpstan-magento1/tree/v1.0.7" }, - "time": "2022-12-30T08:43:52+00:00" + "time": "2023-06-13T14:11:06+00:00" }, { "name": "magento-ecg/coding-standard", From 15f762343e37aef9eef218c5d5225ddb40201058 Mon Sep 17 00:00:00 2001 From: kyrena <78410399+kyrena@users.noreply.github.com> Date: Mon, 19 Jun 2023 09:46:32 +0200 Subject: [PATCH 6/6] Fixed passing null for str_replace is deprecated in Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Links (#3330) --- .../Product/Edit/Tab/Downloadable/Links.php | 71 ++++++++++--------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php b/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php index 2132ace0449..31de8eb27c8 100644 --- a/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php +++ b/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php @@ -164,41 +164,46 @@ public function getLinkData() 'sample_type' => $item->getSampleType(), 'sort_order' => $item->getSortOrder(), ]; - $file = Mage::helper('downloadable/file')->getFilePath( - Mage_Downloadable_Model_Link::getBasePath(), - $item->getLinkFile() - ); - - if ($item->getLinkFile() && !is_file($file)) { - Mage::helper('core/file_storage_database')->saveFileToFilesystem($file); - } - if ($item->getLinkFile() && is_file($file)) { - $name = '' . Mage::helper('downloadable/file')->getFileFromPathFile($item->getLinkFile()) . ''; - $tmpLinkItem['file_save'] = [ - [ - 'file' => $item->getLinkFile(), - 'name' => $name, - 'size' => filesize($file), - 'status' => 'old' - ]]; + if ($item->getLinkFile()) { + $file = Mage::helper('downloadable/file')->getFilePath( + Mage_Downloadable_Model_Link::getBasePath(), + $item->getLinkFile() + ); + if (!is_file($file)) { + Mage::helper('core/file_storage_database')->saveFileToFilesystem($file); + } + if (is_file($file)) { + $name = '' . Mage::helper('downloadable/file')->getFileFromPathFile($item->getLinkFile()) . ''; + $tmpLinkItem['file_save'] = [ + [ + 'file' => $item->getLinkFile(), + 'name' => $name, + 'size' => filesize($file), + 'status' => 'old' + ] + ]; + } } - $sampleFile = Mage::helper('downloadable/file')->getFilePath( - Mage_Downloadable_Model_Link::getBaseSamplePath(), - $item->getSampleFile() - ); - if ($item->getSampleFile() && is_file($sampleFile)) { - $tmpLinkItem['sample_file_save'] = [ - [ - 'file' => $item->getSampleFile(), - 'name' => Mage::helper('downloadable/file')->getFileFromPathFile($item->getSampleFile()), - 'size' => filesize($sampleFile), - 'status' => 'old' - ]]; + if ($item->getSampleFile()) { + $sampleFile = Mage::helper('downloadable/file')->getFilePath( + Mage_Downloadable_Model_Link::getBaseSamplePath(), + $item->getSampleFile() + ); + if (is_file($sampleFile)) { + $tmpLinkItem['sample_file_save'] = [ + [ + 'file' => $item->getSampleFile(), + 'name' => Mage::helper('downloadable/file')->getFileFromPathFile($item->getSampleFile()), + 'size' => filesize($sampleFile), + 'status' => 'old' + ] + ]; + } } if ($item->getNumberOfDownloads() == '0') { $tmpLinkItem['is_unlimited'] = ' checked="checked"';