Skip to content

Instantly share code, notes, and snippets.

View DanielRiezebos's full-sized avatar
💭
Lord of Support @mooore-digital

Daniel Riezebos DanielRiezebos

💭
Lord of Support @mooore-digital
  • @Marissen
View GitHub Profile
@DanielRiezebos
DanielRiezebos / disable_unused_magento2_modules.sh
Created January 18, 2021 14:51
Disable unused Magento 2 modules
#!/bin/bash
bin/magento module:status | \
grep -E '(Magento_(Adobe|Braintree|Signifyd|Fedex|Marketplace|Marketplace|Authorizenet.*|.*Analytics)|Temando_|Amazon_|Yotpo_|Dotdigitalgroup_|Vertex_|Klarna_)' | \
grep -v Magento_GoogleAnalytics | \
xargs bin/magento module:disable
@DanielRiezebos
DanielRiezebos / email_shipments.patch
Created July 6, 2020 13:40
Email Copy of Shipment always checked
--- /vendor/magento/module-shipping/view/adminhtml/templates/create/items.phtml 2020-04-23 08:56:44.000000000 +0200
+++ /vendor/magento/module-shipping/view/adminhtml/templates/create/items.phtml 2020-07-06 15:37:15.774409586 +0200
@@ -101,7 +101,9 @@
class="admin__control-checkbox"
name="shipment[send_email]"
value="1"
- type="checkbox"/>
+ type="checkbox"
+ checked="checked"
+ />
@DanielRiezebos
DanielRiezebos / EmailMessageInterface_2.3.3_backward_compatibility - Framework - TransportBuilder.diff
Created February 5, 2020 09:52
EmailMessageInterface_2.3.3_backward_compatibility - Framework - TransportBuilder
diff --git a/vendor/magento/framework/Mail/Template/TransportBuilder.php b/vendor/magento/framework/Mail/Template/TransportBuilder.php
index 4a8d6572faa..2d28e2f560a 100644
--- a/vendor/magento/framework/Mail/Template/TransportBuilder.php
+++ b/vendor/magento/framework/Mail/Template/TransportBuilder.php
@@ -87,7 +87,7 @@ class TransportBuilder
/**
* Message
*
- * @var EmailMessageInterface
+ * @var MessageInterface
@DanielRiezebos
DanielRiezebos / EmailMessageInterface_2.3.3_backward_compatibility - Framework - Message.diff
Created February 5, 2020 09:49
EmailMessageInterface_2.3.3_backward_compatibility - Framework - Message
diff --git a/vendor/magento/framework/Mail/Message.php b/vendor/magento/framework/Mail/Message.php
index b15b75ca9ac..1f423e80108 100644
--- a/vendor/magento/framework/Mail/Message.php
+++ b/vendor/magento/framework/Mail/Message.php
@@ -10,13 +10,16 @@ use Zend\Mime\Part;
/**
* Class Message for email transportation
+ *
+ * @deprecated
@DanielRiezebos
DanielRiezebos / EmailMessageInterface_2.3.3_backward_compatibility - Framework - MailMessageInterface.diff
Created February 5, 2020 09:48
EmailMessageInterface_2.3.3_backward_compatibility - Framework - MailMessageInterface
diff --git a/vendor/magento/framework/Mail/MailMessageInterface.php b/vendor/magento/framework/Mail/MailMessageInterface.php
index da010be2702..5179e6057c4 100644
--- a/vendor/magento/framework/Mail/MailMessageInterface.php
+++ b/vendor/magento/framework/Mail/MailMessageInterface.php
@@ -9,6 +9,8 @@ namespace Magento\Framework\Mail;
* Mail Message interface
*
* @api
+ * @deprecated
+ * @see \Magento\Framework\Mail\EmailMessageInterface
@DanielRiezebos
DanielRiezebos / EmailMessageInterface_2.3.3_backward_compatibility - Framework - EmailMessageInterface.diff
Created February 5, 2020 09:46
EmailMessageInterface_2.3.3_backward_compatibility - Framework - EmailMessageInterface
diff --git a/vendor/magento/framework/Mail/EmailMessageInterface.php b/vendor/magento/framework/Mail/EmailMessageInterface.php
index 95f83ff679c..93eaa4acde3 100644
--- a/vendor/magento/framework/Mail/EmailMessageInterface.php
+++ b/vendor/magento/framework/Mail/EmailMessageInterface.php
@@ -9,7 +9,7 @@ namespace Magento\Framework\Mail;
/**
* Interface EmailMessageInterface
*/
-interface EmailMessageInterface
+interface EmailMessageInterface extends MailMessageInterface
@DanielRiezebos
DanielRiezebos / EmailMessageInterface_2.3.3_backward_compatibility_framework_emailmessage.diff
Last active February 5, 2020 09:45
EmailMessageInterface_2.3.3_backward_compatibility - Framework - EmailMessage
diff --git a/vendor/magento/framework/Mail/EmailMessage.php b/vendor/magento/framework/Mail/EmailMessage.php
index aaef9750751..02c75977cd0 100644
--- a/vendor/magento/framework/Mail/EmailMessage.php
+++ b/vendor/magento/framework/Mail/EmailMessage.php
@@ -10,19 +10,13 @@ namespace Magento\Framework\Mail;
use Magento\Framework\Mail\Exception\InvalidArgumentException;
use Zend\Mail\Address as ZendAddress;
use Zend\Mail\AddressList;
-use Zend\Mail\Message as ZendMessage;
use Zend\Mime\Message as ZendMimeMessage;
@DanielRiezebos
DanielRiezebos / EmailMessageInterface_backward_compatibility-module-email.diff
Last active February 5, 2020 09:18
EmailMessageInterface_2.3.3_backward_compatibility - Module-Email
diff --git a/vendor/magento/module-email/Model/Transport.php b/vendor/magento/module-email/Transport.php
index cbce1682cb5..79ceb56a883 100644
--- a/vendor/magento/module-email/Model/Transport.php
+++ b/vendor/magento/module-email/Model/Transport.php
@@ -9,7 +9,6 @@ namespace Magento\Email\Model;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\Exception\MailException;
-use Magento\Framework\Mail\EmailMessageInterface;
use Magento\Framework\Mail\MessageInterface;
--- Model/Wysiwyg/Images/Storage.php 2020-01-24 14:06:05.381980784 +0100
+++ Model/Wysiwyg/Images/Storage.php 2020-01-24 14:06:25.794948208 +0100
@@ -594,7 +594,7 @@
$mediaRootDir = $this->_cmsWysiwygImages->getStorageRoot();
if (strpos($filePath, (string) $mediaRootDir) === 0) {
- $thumbSuffix = self::THUMBS_DIRECTORY_NAME . substr($filePath, strlen($mediaRootDir));
+ $thumbSuffix = self::THUMBS_DIRECTORY_NAME . '/' . substr($filePath, strlen($mediaRootDir));
if (!$checkFile || $this->_directory->isExist(
$this->_directory->getRelativePath($mediaRootDir . '/' . $thumbSuffix)
--- a/vendor/magento/module-catalog/Model/Category/Attribute/Backend/Image.php 2020-01-02 11:51:58.694620443 +0100
+++ b/vendor/magento/module-catalog/Model/Category/Attribute/Backend/Image.php 2020-01-02 12:06:08.734544971 +0100
@@ -125,7 +125,9 @@
}
if ($imageName = $this->getUploadedImageName($value)) {
- $imageName = $this->checkUniqueImageName($imageName);
+ if (array_key_exists('tmp_name', $value[0])) {
+ $imageName = $this->checkUniqueImageName($imageName);
+ }