diff --git a/app/code/Magento/Downloadable/Controller/Download.php b/app/code/Magento/Downloadable/Controller/Download.php index f0bef425d4b..583b5a33c6b 100644 --- a/app/code/Magento/Downloadable/Controller/Download.php +++ b/app/code/Magento/Downloadable/Controller/Download.php @@ -64,7 +64,7 @@ protected function _processDownload($path, $resourceType) $contentDisposition = $helper->getContentDisposition(); if (!$contentDisposition || in_array($contentType, $this->disallowedContentTypes)) { // For security reasons we force browsers to download the file instead of opening it. - $contentDisposition = \Zend_Mime::DISPOSITION_ATTACHMENT; + $contentDisposition = \Magento\Framework\HTTP\Mime::DISPOSITION_ATTACHMENT; } $response->setHeader('Content-Disposition', $contentDisposition . '; filename=' . $fileName); diff --git a/app/code/Magento/Downloadable/Test/Unit/Controller/Download/LinkTest.php b/app/code/Magento/Downloadable/Test/Unit/Controller/Download/LinkTest.php index f2e288d75a4..7e756c1790a 100644 --- a/app/code/Magento/Downloadable/Test/Unit/Controller/Download/LinkTest.php +++ b/app/code/Magento/Downloadable/Test/Unit/Controller/Download/LinkTest.php @@ -492,8 +492,8 @@ public function linkNotAvailableDataProvider() public function downloadTypesDataProvider() { return [ - ['mimeType' => 'text/html', 'disposition' => \Zend_Mime::DISPOSITION_ATTACHMENT], - ['mimeType' => 'image/jpeg', 'disposition' => \Zend_Mime::DISPOSITION_INLINE], + ['mimeType' => 'text/html', 'disposition' => \Magento\Framework\HTTP\Mime::DISPOSITION_ATTACHMENT], + ['mimeType' => 'image/jpeg', 'disposition' => \Magento\Framework\HTTP\Mime::DISPOSITION_INLINE], ]; } } diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php index 957612f22b4..8edc916f2af 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php @@ -169,9 +169,7 @@ public function testSendAction() \Magento\TestFramework\Mail\Template\TransportBuilderMock::class ); - $actualResult = \Zend_Mime_Decode::decodeQuotedPrintable( - $transportBuilder->getSentMessage()->getRawMessage() - ); + $actualResult = quoted_printable_decode($transportBuilder->getSentMessage()->getRawMessage()); $this->assertStringMatchesFormat( '%A' . $this->_customerViewHelper->getCustomerName($this->_customerSession->getCustomerDataObject()) diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php index f75f89c05ea..1faf2a5a4aa 100755 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php @@ -4234,5 +4234,6 @@ 'Magento\Elasticsearch\Test\Unit\Model\SearchAdapter\ConnectionManagerTest', 'Magento\Elasticsearch\Test\Unit\SearchAdapter\ConnectionManagerTest' ], - ['Zend_Feed', 'Zend\Feed'] + ['Zend_Feed', 'Zend\Feed'], + ['Zend_Mime', 'Magento\Framework\HTTP\Mime'], ]; diff --git a/lib/internal/Magento/Framework/HTTP/Mime.php b/lib/internal/Magento/Framework/HTTP/Mime.php new file mode 100644 index 00000000000..7979fb2b7d1 --- /dev/null +++ b/lib/internal/Magento/Framework/HTTP/Mime.php @@ -0,0 +1,28 @@ +