File tree Expand file tree Collapse file tree 7 files changed +43
-29
lines changed
app/code/Magento/ImportExport Expand file tree Collapse file tree 7 files changed +43
-29
lines changed Original file line number Diff line number Diff line change @@ -17,30 +17,15 @@ interface ExtendedExportInfoInterface extends ExportInfoInterface
1717 /**
1818 * Returns skipped attributes
1919 *
20- * @return string[]|null
20+ * @return mixed
2121 */
22- public function getSkipAttr (): ? array ;
22+ public function getSkipAttr ();
2323
2424 /**
2525 * Set skipped attributes
2626 *
27- * @param string[] $skipAttr
28- * @return void
27+ * @param string $skipAttr
28+ * @return mixed
2929 */
30- public function setSkipAttr (array $ skipAttr ): void ;
31-
32- /**
33- * Returns admin locale
34- *
35- * @return string|null
36- */
37- public function getLocale (): ?string ;
38-
39- /**
40- * Set admin locale
41- *
42- * @param string $locale
43- * @return void
44- */
45- public function setLocale (string $ locale ): void ;
30+ public function setSkipAttr ($ skipAttr );
4631}
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Copyright © Magento, Inc. All rights reserved.
4+ * See COPYING.txt for license details.
5+ */
6+ declare (strict_types=1 );
7+
8+ namespace Magento \ImportExport \Api \Data ;
9+
10+ /**
11+ * Localized export interface for correct parsing values (like date) provided in admin ui locale.
12+ */
13+ interface LocalizedExportInfoInterface extends ExtendedExportInfoInterface
14+ {
15+ /**
16+ * Returns admin locale
17+ *
18+ * @return string|null
19+ */
20+ public function getLocale (): ?string ;
21+
22+ /**
23+ * Set admin locale
24+ *
25+ * @param string $locale
26+ * @return void
27+ */
28+ public function setLocale (string $ locale ): void ;
29+ }
Original file line number Diff line number Diff line change 1212use Magento \Framework \Exception \LocalizedException ;
1313use Magento \Framework \Filesystem ;
1414use Magento \Framework \Locale \ResolverInterface ;
15- use Magento \ImportExport \Api \Data \ExtendedExportInfoInterface ;
15+ use Magento \ImportExport \Api \Data \LocalizedExportInfoInterface ;
1616use Magento \ImportExport \Api \ExportManagementInterface ;
1717use Magento \Framework \Notification \NotifierInterface ;
1818
@@ -71,10 +71,10 @@ public function __construct(
7171 /**
7272 * Consumer logic.
7373 *
74- * @param ExtendedExportInfoInterface $exportInfo
74+ * @param LocalizedExportInfoInterface $exportInfo
7575 * @return void
7676 */
77- public function process (ExtendedExportInfoInterface $ exportInfo )
77+ public function process (LocalizedExportInfoInterface $ exportInfo )
7878 {
7979 $ currentLocale = $ this ->localeResolver ->getLocale ();
8080 if ($ exportInfo ->getLocale ()) {
Original file line number Diff line number Diff line change 77
88namespace Magento \ImportExport \Model \Export \Entity ;
99
10- use Magento \ImportExport \Api \Data \ExtendedExportInfoInterface ;
10+ use Magento \ImportExport \Api \Data \LocalizedExportInfoInterface ;
1111
1212/**
1313 * Class ExportInfo implementation for ExportInfoInterface.
1414 */
15- class ExportInfo implements ExtendedExportInfoInterface
15+ class ExportInfo implements LocalizedExportInfoInterface
1616{
1717 /**
1818 * @var string
Original file line number Diff line number Diff line change 1212use Magento \Framework \Filesystem \Directory \WriteInterface ;
1313use Magento \Framework \Locale \ResolverInterface ;
1414use Magento \Framework \Notification \NotifierInterface ;
15- use Magento \ImportExport \Api \Data \ExtendedExportInfoInterface ;
15+ use Magento \ImportExport \Api \Data \LocalizedExportInfoInterface ;
1616use Magento \ImportExport \Api \ExportManagementInterface ;
1717use Magento \ImportExport \Model \Export \Consumer ;
1818use PHPUnit \Framework \MockObject \MockObject ;
@@ -70,7 +70,7 @@ protected function setUp(): void
7070 public function testProcess ()
7171 {
7272 $ adminLocale = 'de_DE ' ;
73- $ exportInfoMock = $ this ->createMock (ExtendedExportInfoInterface ::class);
73+ $ exportInfoMock = $ this ->createMock (LocalizedExportInfoInterface ::class);
7474 $ exportInfoMock ->expects ($ this ->atLeastOnce ())
7575 ->method ('getLocale ' )
7676 ->willReturn ($ adminLocale );
Original file line number Diff line number Diff line change 66 */
77-->
88<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Communication/etc/communication.xsd" >
9- <topic name =" import_export.export" request =" Magento\ImportExport\Api\Data\ExtendedExportInfoInterface " >
9+ <topic name =" import_export.export" request =" Magento\ImportExport\Api\Data\LocalizedExportInfoInterface " >
1010 <handler name =" exportProcessor" type =" Magento\ImportExport\Model\Export\Consumer" method =" process" />
1111 </topic >
1212</config >
Original file line number Diff line number Diff line change 1111 <preference for =" Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface" type =" Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregator" />
1212 <preference for =" Magento\ImportExport\Model\Report\ReportProcessorInterface" type =" Magento\ImportExport\Model\Report\Csv" />
1313 <preference for =" Magento\ImportExport\Api\Data\ExportInfoInterface" type =" Magento\ImportExport\Model\Export\Entity\ExportInfo" />
14- <preference for =" Magento\ImportExport\Api\Data\ExtendedExportInfoInterface " type =" Magento\ImportExport\Model\Export\Entity\ExportInfo" />
14+ <preference for =" Magento\ImportExport\Api\Data\LocalizedExportInfoInterface " type =" Magento\ImportExport\Model\Export\Entity\ExportInfo" />
1515 <preference for =" Magento\ImportExport\Api\ExportManagementInterface" type =" Magento\ImportExport\Model\Export\ExportManagement" />
1616 <type name =" Magento\Framework\Module\Setup\Migration" >
1717 <arguments >
You can’t perform that action at this time.
0 commit comments