-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔃 [EngCom] Public Pull Requests - 2.3-develop Minor Fixes
Accepted Public Pull Requests: - #21368: Css property name issue (by @amol2jcommerce) - #21360: Solve #21359 Search with long string display horizontal scroll in front end (by @mageprince) - #21328: Issue Fixed #21322 : Declarative schema: Omitting indexType throws exception (by @milindsingh) - #21347: Applied PHP-CS-Fixer for code cleanup. (by @yogeshsuhagiya) - #21335: Fixed #15059 Cannot reorder from the first try (by @shikhamis11) - #21045: Update static block in nginx.conf.sample (by @jaideepghosh) - #19988: Fix for issue 19983 Can't upload customer Image attribute programmatically (by @Nazar65) - #20950: #20773: Do not throw exception during autoload (by @Vinai) - #20583: 13982 customer login block sets the title for the page when rendered (by @lisovyievhenii) - #20307: Fixed issue #20305 Update button on payment checkout is not proper alligned (by @GovindaSharma) - #18503: Checkout - Fix JS error Cannot read property 'quoteData' of undefined (by @ihor-sviziev) - #20043: Make it possible to generate sales PDF's using the API (by @AntonEvers) Fixed GitHub Issues: - #21365: CSS Property name issue (reported by @klierik) has been fixed in #21368 by @amol2jcommerce in 2.3-develop branch Related commits: 1. f669a4d 2. ac8b808 3. 40a6274 4. 2123f2f 5. 9a0c504 6. a68e815 - #21359: Search with long string display horizontal scroll in front end (reported by @mageprince) has been fixed in #21360 by @mageprince in 2.3-develop branch Related commits: 1. b63123e 2. 1236770 - #21322: Declarative schema: Omitting indexType throws exception (reported by @k4emic) has been fixed in #21328 by @milindsingh in 2.3-develop branch Related commits: 1. b179e54 - #15059: Cannot reorder from the first try (reported by @TomashKhamlai) has been fixed in #21335 by @shikhamis11 in 2.3-develop branch Related commits: 1. 3e83284 2. 124b0e0 - #19983: Can't work customer Image attribute programmatically (reported by @cygnetampatel) has been fixed in #19988 by @Nazar65 in 2.3-develop branch Related commits: 1. 6d5ee63 2. 188a3e6 3. 20fd589 4. 9ca8077 5. a051656 6. 1372203 7. acc98ec - #20773: The autoloader throws an exception on class_exists (reported by @sidolov) has been fixed in #20950 by @Vinai in 2.3-develop branch Related commits: 1. cab38a2 2. cfbf8c9 3. 9d3bc18 - #13982: Customer Login Block sets the title for the page when rendered (reported by @matthew-muscat) has been fixed in #20583 by @lisovyievhenii in 2.3-develop branch Related commits: 1. 122e5c2 2. 93f1caa - #20305: Update button on payment checkout is not proper alligned (reported by @mohammadzakir) has been fixed in #20307 by @GovindaSharma in 2.3-develop branch Related commits: 1. 99d6e43 2. da46b6a 3. 1d1bb33 - #14412: Magento 2.2.3 TypeErrors Cannot read property 'quoteData' / 'storecode' / 'sectionLoadUrl' of undefined (reported by @bramulous) has been fixed in #18503 by @ihor-sviziev in 2.3-develop branch Related commits: 1. 96687ac
- Loading branch information
Showing
22 changed files
with
262 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,8 @@ | |
*/ | ||
define([ | ||
'ko', | ||
'underscore' | ||
'underscore', | ||
'domReady!' | ||
], function (ko, _) { | ||
'use strict'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
app/code/Magento/OfflinePayments/view/base/templates/info/pdf/checkmo.phtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
// @codingStandardsIgnoreFile | ||
/** | ||
* @var $block \Magento\OfflinePayments\Block\Info\Checkmo | ||
*/ | ||
?> | ||
<?= $block->escapeHtml($block->getMethod()->getTitle()) ?> | ||
{{pdf_row_separator}} | ||
<?php if ($block->getInfo()->getAdditionalInformation()): ?> | ||
{{pdf_row_separator}} | ||
<?php if ($block->getPayableTo()): ?> | ||
<?= $block->escapeHtml(__('Make Check payable to: %1', $block->getPayableTo())) ?> | ||
{{pdf_row_separator}} | ||
<?php endif; ?> | ||
<?php if ($block->getMailingAddress()): ?> | ||
<?= $block->escapeHtml(__('Send Check to:')) ?> | ||
{{pdf_row_separator}} | ||
<?= /* @noEscape */ nl2br($block->escapeHtml($block->getMailingAddress())) ?> | ||
{{pdf_row_separator}} | ||
<?php endif; ?> | ||
<?php endif; ?> |
11 changes: 11 additions & 0 deletions
11
app/code/Magento/OfflinePayments/view/base/templates/info/pdf/purchaseorder.phtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
/** | ||
* @var $block \Magento\OfflinePayments\Block\Info\Purchaseorder | ||
*/ | ||
?> | ||
<?= $block->escapeHtml(__('Purchase Order Number: %1', $block->getInfo()->getPoNumber())) ?> | ||
{{pdf_row_separator}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
app/code/Magento/Payment/view/base/templates/info/pdf/default.phtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
// @codingStandardsIgnoreFile | ||
/** | ||
* @see \Magento\Payment\Block\Info | ||
* @var \Magento\Payment\Block\Info $block | ||
*/ | ||
?> | ||
<?= $block->escapeHtml($block->getMethod()->getTitle()) ?>{{pdf_row_separator}} | ||
|
||
<?php if ($specificInfo = $block->getSpecificInformation()):?> | ||
<?php foreach ($specificInfo as $label => $value):?> | ||
<?= $block->escapeHtml($label) ?>: | ||
<?= $block->escapeHtml(implode(' ', $block->getValueAsArray($value))) ?> | ||
{{pdf_row_separator}} | ||
<?php endforeach; ?> | ||
<?php endif;?> | ||
|
||
<?= $block->escapeHtml(implode('{{pdf_row_separator}}', $block->getChildPdfAsArray())) ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
dev/tests/integration/testsuite/Magento/Framework/Code/Generator/AutoloaderTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?php declare(strict_types=1); | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Framework\Code\Generator; | ||
|
||
use Magento\Framework\Code\Generator; | ||
use Magento\Framework\Logger\Monolog as MagentoMonologLogger; | ||
use Magento\TestFramework\ObjectManager; | ||
use PHPUnit\Framework\TestCase; | ||
use PHPUnit_Framework_MockObject_MockObject as MockObject; | ||
use Psr\Log\LoggerInterface; | ||
|
||
class AutoloaderTest extends TestCase | ||
{ | ||
/** | ||
* This method exists to fix the wrong return type hint on \Magento\Framework\App\ObjectManager::getInstance. | ||
* This way the IDE knows it's dealing with an instance of \Magento\TestFramework\ObjectManager and | ||
* not \Magento\Framework\App\ObjectManager. The former has the method addSharedInstance, the latter does not. | ||
* | ||
* @return ObjectManager|\Magento\Framework\App\ObjectManager | ||
* @SuppressWarnings(PHPMD.StaticAccess) | ||
*/ | ||
private function getTestFrameworkObjectManager() | ||
{ | ||
return ObjectManager::getInstance(); | ||
} | ||
|
||
/** | ||
* @before | ||
*/ | ||
public function setupLoggerTestDouble(): void | ||
{ | ||
$loggerTestDouble = $this->createMock(LoggerInterface::class); | ||
$this->getTestFrameworkObjectManager()->addSharedInstance($loggerTestDouble, MagentoMonologLogger::class); | ||
} | ||
|
||
/** | ||
* @after | ||
*/ | ||
public function removeLoggerTestDouble(): void | ||
{ | ||
$this->getTestFrameworkObjectManager()->removeSharedInstance(MagentoMonologLogger::class); | ||
} | ||
|
||
/** | ||
* @param \RuntimeException $testException | ||
* @return Generator|MockObject | ||
*/ | ||
private function createExceptionThrowingGeneratorTestDouble(\RuntimeException $testException) | ||
{ | ||
/** @var Generator|MockObject $generatorStub */ | ||
$generatorStub = $this->createMock(Generator::class); | ||
$generatorStub->method('generateClass')->willThrowException($testException); | ||
|
||
return $generatorStub; | ||
} | ||
|
||
public function testLogsExceptionDuringGeneration(): void | ||
{ | ||
$exceptionMessage = 'Test exception thrown during generation'; | ||
$testException = new \RuntimeException($exceptionMessage); | ||
|
||
$loggerMock = ObjectManager::getInstance()->get(LoggerInterface::class); | ||
$loggerMock->expects($this->once())->method('debug')->with($exceptionMessage, ['exception' => $testException]); | ||
|
||
$autoloader = new Autoloader($this->createExceptionThrowingGeneratorTestDouble($testException)); | ||
$this->assertNull($autoloader->load(NonExistingClassName::class)); | ||
} | ||
|
||
public function testFiltersDuplicateExceptionMessages(): void | ||
{ | ||
$exceptionMessage = 'Test exception thrown during generation'; | ||
$testException = new \RuntimeException($exceptionMessage); | ||
|
||
$loggerMock = ObjectManager::getInstance()->get(LoggerInterface::class); | ||
$loggerMock->expects($this->once())->method('debug')->with($exceptionMessage, ['exception' => $testException]); | ||
|
||
$autoloader = new Autoloader($this->createExceptionThrowingGeneratorTestDouble($testException)); | ||
$autoloader->load(OneNonExistingClassName::class); | ||
$autoloader->load(AnotherNonExistingClassName::class); | ||
} | ||
} |
Oops, something went wrong.