diff --git a/app/code/Magento/Catalog/Block/Product/ListProduct.php b/app/code/Magento/Catalog/Block/Product/ListProduct.php index 73beec6b2b2e1..c28ab40b55364 100644 --- a/app/code/Magento/Catalog/Block/Product/ListProduct.php +++ b/app/code/Magento/Catalog/Block/Product/ListProduct.php @@ -296,7 +296,7 @@ public function prepareSortableFieldsByCategory($category) } $availableOrders = $this->getAvailableOrders(); if (!$this->getSortBy()) { - $categorySortBy = $category->getDefaultSortBy(); + $categorySortBy = $this->getDefaultSortBy() ?: $category->getDefaultSortBy(); if ($categorySortBy) { if (!$availableOrders) { $availableOrders = $this->_getConfig()->getAttributeUsedForSortByArray(); diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php index c44c68e372aa3..4661cfb7110c2 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php @@ -5,6 +5,7 @@ */ namespace Magento\Catalog\Block\Product\ProductList; +use Magento\Catalog\Helper\Product\ProductList; use Magento\Catalog\Model\Product\ProductList\Toolbar as ToolbarModel; /** @@ -63,7 +64,7 @@ class Toolbar extends \Magento\Framework\View\Element\Template * * @var string */ - protected $_direction = \Magento\Catalog\Helper\Product\ProductList::DEFAULT_SORT_DIRECTION; + protected $_direction = ProductList::DEFAULT_SORT_DIRECTION; /** * Default View mode @@ -102,7 +103,7 @@ class Toolbar extends \Magento\Framework\View\Element\Template protected $_toolbarModel; /** - * @var \Magento\Catalog\Helper\Product\ProductList + * @var ProductList */ protected $_productListHelper; @@ -122,7 +123,7 @@ class Toolbar extends \Magento\Framework\View\Element\Template * @param \Magento\Catalog\Model\Config $catalogConfig * @param ToolbarModel $toolbarModel * @param \Magento\Framework\Url\EncoderInterface $urlEncoder - * @param \Magento\Catalog\Helper\Product\ProductList $productListHelper + * @param ProductList $productListHelper * @param \Magento\Framework\Data\Helper\PostHelper $postDataHelper * @param array $data */ @@ -132,7 +133,7 @@ public function __construct( \Magento\Catalog\Model\Config $catalogConfig, ToolbarModel $toolbarModel, \Magento\Framework\Url\EncoderInterface $urlEncoder, - \Magento\Catalog\Helper\Product\ProductList $productListHelper, + ProductList $productListHelper, \Magento\Framework\Data\Helper\PostHelper $postDataHelper, array $data = [] ) { @@ -355,7 +356,7 @@ public function removeOrderFromAvailableOrders($order) } /** - * Compare defined order field vith current order field + * Compare defined order field with current order field * * @param string $order * @return bool @@ -375,7 +376,7 @@ public function getPagerUrl($params = []) { $urlParams = []; $urlParams['_current'] = true; - $urlParams['_escape'] = true; + $urlParams['_escape'] = false; $urlParams['_use_rewrite'] = true; $urlParams['_query'] = $params; return $this->getUrl('*/*/*', $urlParams); @@ -678,7 +679,7 @@ public function getWidgetOptionsJson(array $customOptions = []) 'order' => ToolbarModel::ORDER_PARAM_NAME, 'limit' => ToolbarModel::LIMIT_PARAM_NAME, 'modeDefault' => $defaultMode, - 'directionDefault' => \Magento\Catalog\Helper\Product\ProductList::DEFAULT_SORT_DIRECTION, + 'directionDefault' => $this->_direction ?: ProductList::DEFAULT_SORT_DIRECTION, 'orderDefault' => $this->_productListHelper->getDefaultSortField(), 'limitDefault' => $this->_productListHelper->getDefaultLimitPerPageValue($defaultMode), 'url' => $this->getPagerUrl(), diff --git a/app/code/Magento/Catalog/Setup/UpgradeData.php b/app/code/Magento/Catalog/Setup/UpgradeData.php index 5adf385101fc2..4c2d32738e88b 100644 --- a/app/code/Magento/Catalog/Setup/UpgradeData.php +++ b/app/code/Magento/Catalog/Setup/UpgradeData.php @@ -46,21 +46,31 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $entityTypeId = $categorySetup->getEntityTypeId(\Magento\Catalog\Model\Product::ENTITY); $attributeSetId = $categorySetup->getDefaultAttributeSetId($entityTypeId); - $attributeGroupId = $categorySetup->getAttributeGroupId($entityTypeId, $attributeSetId, 'Images'); - - // update General Group - $categorySetup->updateAttributeGroup( + $attributeGroup = $categorySetup->getAttributeGroup( $entityTypeId, $attributeSetId, - $attributeGroupId, - 'attribute_group_name', - 'Images and Videos' + 'Images', + 'attribute_group_name' ); + if (isset($attributeGroup['attribute_group_name']) && $attributeGroup['attribute_group_name'] == 'Images') { + // update General Group + $categorySetup->updateAttributeGroup( + $entityTypeId, + $attributeSetId, + $attributeGroup['attribute_group_id'], + 'attribute_group_name', + 'Images and Videos' + ); + } + } + + if ($context->getVersion() + && version_compare($context->getVersion(), '2.0.1') < 0 + ) { $select = $setup->getConnection()->select() ->from( $setup->getTable('catalog_product_entity_group_price'), [ - 'value_id', 'entity_id', 'all_groups', 'customer_group_id', @@ -69,11 +79,10 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface 'website_id' ] ); - $setup->getConnection()->insertFromSelect( + $select = $setup->getConnection()->insertFromSelect( $select, - $setup->getTable('catalog_product_entity_group_price'), + $setup->getTable('catalog_product_entity_tier_price'), [ - 'value_id', 'entity_id', 'all_groups', 'customer_group_id', @@ -82,6 +91,8 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface 'website_id' ] ); + $setup->getConnection()->query($select); + $categorySetupManager = $this->categorySetupFactory->create(); $categorySetupManager->removeAttribute(\Magento\Catalog\Model\Product::ENTITY, 'group_price'); } diff --git a/app/code/Magento/Catalog/Setup/UpgradeSchema.php b/app/code/Magento/Catalog/Setup/UpgradeSchema.php index 717f06a0cd58e..cf92de0f7e6bb 100644 --- a/app/code/Magento/Catalog/Setup/UpgradeSchema.php +++ b/app/code/Magento/Catalog/Setup/UpgradeSchema.php @@ -140,6 +140,10 @@ protected function addForeignKeys(SchemaSetupInterface $setup) */ private function addSupportVideoMediaAttributes(SchemaSetupInterface $setup) { + if ($setup->tableExists(Media::GALLERY_VALUE_TO_ENTITY_TABLE)) { + return; + }; + /** Add support video media attribute */ $this->createValueToEntityTable($setup); /** diff --git a/app/code/Magento/Catalog/view/frontend/web/js/product/list/toolbar.js b/app/code/Magento/Catalog/view/frontend/web/js/product/list/toolbar.js index 688f836fb1035..5904b567278b7 100644 --- a/app/code/Magento/Catalog/view/frontend/web/js/product/list/toolbar.js +++ b/app/code/Magento/Catalog/view/frontend/web/js/product/list/toolbar.js @@ -68,7 +68,9 @@ define([ parameters; for (var i = 0; i < urlParams.length; i++) { parameters = urlParams[i].split('='); - paramData[parameters[0]] = parameters[1] !== undefined ? parameters[1] : ''; + paramData[parameters[0]] = parameters[1] !== undefined + ? window.decodeURIComponent(parameters[1].replace(/\+/g, '%20')) + : ''; } paramData[paramName] = paramValue; if (paramValue == defaultValue) { @@ -81,4 +83,4 @@ define([ }); return $.mage.productListToolbarForm; -}); \ No newline at end of file +}); diff --git a/app/code/Magento/CatalogSearch/Block/Result.php b/app/code/Magento/CatalogSearch/Block/Result.php index 6c227c0588977..6670743efd1ce 100644 --- a/app/code/Magento/CatalogSearch/Block/Result.php +++ b/app/code/Magento/CatalogSearch/Block/Result.php @@ -133,12 +133,13 @@ public function setListOrders() /* @var $category \Magento\Catalog\Model\Category */ $availableOrders = $category->getAvailableSortByOptions(); unset($availableOrders['position']); + $availableOrders['relevance'] = __('Relevance'); $this->getListBlock()->setAvailableOrders( $availableOrders )->setDefaultDirection( 'desc' - )->setSortBy( + )->setDefaultSortBy( 'relevance' ); diff --git a/app/code/Magento/Store/App/Request/PathInfoProcessor.php b/app/code/Magento/Store/App/Request/PathInfoProcessor.php index ebe3b64aa3b9c..ef07979226c54 100644 --- a/app/code/Magento/Store/App/Request/PathInfoProcessor.php +++ b/app/code/Magento/Store/App/Request/PathInfoProcessor.php @@ -5,19 +5,21 @@ */ namespace Magento\Store\App\Request; +use Magento\Framework\Exception\NoSuchEntityException; + class PathInfoProcessor implements \Magento\Framework\App\Request\PathInfoProcessorInterface { /** * @var \Magento\Store\Model\StoreManagerInterface */ - private $_storeManager; + private $storeManager; /** * @param \Magento\Store\Model\StoreManagerInterface $storeManager */ public function __construct(\Magento\Store\Model\StoreManagerInterface $storeManager) { - $this->_storeManager = $storeManager; + $this->storeManager = $storeManager; } /** @@ -33,14 +35,15 @@ public function process(\Magento\Framework\App\RequestInterface $request, $pathI $storeCode = $pathParts[0]; try { - $store = $this->_storeManager->getStore($storeCode); - } catch (\InvalidArgumentException $e) { // TODO: MAGETWO-39826 Need to replace on NoSuchEntityException + /** @var \Magento\Store\Api\Data\StoreInterface $store */ + $store = $this->storeManager->getStore($storeCode); + } catch (NoSuchEntityException $e) { return $pathInfo; } if ($store->isUseStoreInUrl()) { if (!$request->isDirectAccessFrontendName($storeCode)) { - $this->_storeManager->setCurrentStore($storeCode); + $this->storeManager->setCurrentStore($storeCode); $pathInfo = '/' . (isset($pathParts[1]) ? $pathParts[1] : ''); return $pathInfo; } elseif (!empty($storeCode)) { diff --git a/app/code/Magento/Store/Controller/Store/SwitchAction.php b/app/code/Magento/Store/Controller/Store/SwitchAction.php index 647b2cf6c320f..b527b7ad4fe70 100644 --- a/app/code/Magento/Store/Controller/Store/SwitchAction.php +++ b/app/code/Magento/Store/Controller/Store/SwitchAction.php @@ -9,6 +9,7 @@ use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context as ActionContext; use Magento\Framework\App\Http\Context as HttpContext; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Store\Api\StoreCookieManagerInterface; use Magento\Store\Api\StoreRepositoryInterface; use Magento\Store\Model\Store; @@ -78,7 +79,7 @@ public function execute() $store = $this->storeRepository->getActiveStoreByCode($storeCode); } catch (StoreIsInactiveException $e) { $error = __('Requested store is inactive'); - } catch (\InvalidArgumentException $e) { + } catch (NoSuchEntityException $e) { $error = __('Requested store is not found'); } diff --git a/app/code/Magento/Store/Model/StoreRepository.php b/app/code/Magento/Store/Model/StoreRepository.php index de3c80adf2b50..3b2d9bcd03a4f 100644 --- a/app/code/Magento/Store/Model/StoreRepository.php +++ b/app/code/Magento/Store/Model/StoreRepository.php @@ -57,8 +57,7 @@ public function get($code) $store = $this->storeFactory->create(); $store->load($code, 'code'); if ($store->getId() === null) { - // TODO: MAGETWO-39826 Need to replace on NoSuchEntityException - throw new \InvalidArgumentException(); + throw new NoSuchEntityException(__('Requested store is not found')); } $this->entities[$code] = $store; $this->entitiesById[$store->getId()] = $store; @@ -89,7 +88,7 @@ public function getById($id) $store = $this->storeFactory->create(); $store->load($id); if ($store->getId() === null) { - throw new NoSuchEntityException(); + throw new NoSuchEntityException(__('Requested store is not found')); } $this->entitiesById[$id] = $store; $this->entities[$store->getCode()] = $store; diff --git a/app/code/Magento/Store/Model/StoreResolver.php b/app/code/Magento/Store/Model/StoreResolver.php index 79a6e53423c79..1f37a8611a277 100644 --- a/app/code/Magento/Store/Model/StoreResolver.php +++ b/app/code/Magento/Store/Model/StoreResolver.php @@ -137,14 +137,9 @@ protected function getRequestedStoreByCode($storeCode) try { $store = $this->storeRepository->getActiveStoreByCode($storeCode); } catch (StoreIsInactiveException $e) { - $error = __('Requested store is inactive'); - } catch (\InvalidArgumentException $e) { // TODO: MAGETWO-39826 Need to replace on NoSuchEntityException - $error = __('Requested store is not found'); + throw new NoSuchEntityException(__('Requested store is inactive')); } - if (isset($error, $e)) { - throw new NoSuchEntityException($error, $e); - } return $store; } @@ -160,14 +155,9 @@ protected function getDefaultStoreById($id) try { $store = $this->storeRepository->getActiveStoreById($id); } catch (StoreIsInactiveException $e) { - $error = __('Default store is inactive'); - } catch (\InvalidArgumentException $e) { // TODO: MAGETWO-39826 Need to replace on NoSuchEntityException - $error = __('Default store is not found'); + throw new NoSuchEntityException(__('Default store is inactive')); } - if (isset($error, $e)) { - throw new NoSuchEntityException($error, $e); - } return $store; } } diff --git a/app/code/Magento/Store/Test/Unit/App/Request/PathInfoProcessorTest.php b/app/code/Magento/Store/Test/Unit/App/Request/PathInfoProcessorTest.php index b81f0a6544f23..9ba184b950995 100644 --- a/app/code/Magento/Store/Test/Unit/App/Request/PathInfoProcessorTest.php +++ b/app/code/Magento/Store/Test/Unit/App/Request/PathInfoProcessorTest.php @@ -5,6 +5,8 @@ */ namespace Magento\Store\Test\Unit\App\Request; +use Magento\Framework\Exception\NoSuchEntityException; + class PathInfoProcessorTest extends \PHPUnit_Framework_TestCase { /** @@ -112,8 +114,7 @@ public function testProcessIfStoreCodeIsNotExist() { $store = $this->getMock('\Magento\Store\Model\Store', [], [], '', false); $this->_storeManagerMock->expects($this->once())->method('getStore')->with('storeCode') - // TODO: MAGETWO-39826 Need to replace on NoSuchEntityException - ->willThrowException(new \InvalidArgumentException()); + ->willThrowException(new NoSuchEntityException()); $store->expects($this->never())->method('isUseStoreInUrl'); $this->_requestMock->expects($this->never())->method('isDirectAccessFrontendName'); diff --git a/dev/tests/integration/testsuite/Magento/Store/App/Request/PathInfoProcessorTest.php b/dev/tests/integration/testsuite/Magento/Store/App/Request/PathInfoProcessorTest.php new file mode 100644 index 0000000000000..8470436c8bd3e --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Store/App/Request/PathInfoProcessorTest.php @@ -0,0 +1,106 @@ +pathProcessor = Bootstrap::getObjectManager()->create('Magento\Store\App\Request\PathInfoProcessor'); + } + + /** + * @covers \Magento\Store\App\Request\PathInfoProcessor::process + * @dataProvider notValidStoreCodeDataProvider + */ + public function testProcessNotValidStoreCode($pathInfo) + { + /** @var \Magento\Framework\App\RequestInterface $request */ + $request = Bootstrap::getObjectManager()->create('Magento\Framework\App\RequestInterface'); + $this->assertEquals($pathInfo, $this->pathProcessor->process($request, $pathInfo)); + } + + public function notValidStoreCodeDataProvider() + { + return [ + ['not_valid_store_code_int' => '/100500/m/c/a'], + ['not_valid_store_code_str' => '/test_string/m/c/a'], + ]; + } + + /** + * @covers \Magento\Store\App\Request\PathInfoProcessor::process + * @magentoDataFixture Magento/Store/_files/core_fixturestore.php + */ + public function testProcessValidStoreCodeCase1() + { + /** @var \Magento\Store\Model\Store $store */ + $store = Bootstrap::getObjectManager()->get('Magento\Store\Model\Store'); + $store->load('fixturestore', 'code'); + + /** @var \Magento\Framework\App\RequestInterface $request */ + $request = Bootstrap::getObjectManager()->create('Magento\Framework\App\RequestInterface'); + + /** @var \Magento\Framework\App\Config\ReinitableConfigInterface $config */ + $config = Bootstrap::getObjectManager()->get('\Magento\Framework\App\Config\ReinitableConfigInterface'); + $config->setValue(Store::XML_PATH_STORE_IN_URL, false, ScopeInterface::SCOPE_STORE, $store->getCode()); + $pathInfo = sprintf('/%s/m/c/a', $store->getCode()); + $this->assertEquals($pathInfo, $this->pathProcessor->process($request, $pathInfo)); + } + + /** + * @covers \Magento\Store\App\Request\PathInfoProcessor::process + * @magentoDataFixture Magento/Store/_files/core_fixturestore.php + */ + public function testProcessValidStoreCodeCase2() + { + /** @var \Magento\Store\Model\Store $store */ + $store = Bootstrap::getObjectManager()->get('Magento\Store\Model\Store'); + $store->load('fixturestore', 'code'); + + /** @var \Magento\Framework\App\RequestInterface $request */ + $request = Bootstrap::getObjectManager()->create('Magento\Framework\App\RequestInterface'); + + /** @var \Magento\Framework\App\Config\ReinitableConfigInterface $config */ + $config = Bootstrap::getObjectManager()->get('\Magento\Framework\App\Config\ReinitableConfigInterface'); + $config->setValue(Store::XML_PATH_STORE_IN_URL, true, ScopeInterface::SCOPE_STORE, $store->getCode()); + $pathInfo = sprintf('/%s/m/c/a', $store->getCode()); + $this->assertEquals('/m/c/a', $this->pathProcessor->process($request, $pathInfo)); + } + + /** + * @covers \Magento\Store\App\Request\PathInfoProcessor::process + * @magentoDataFixture Magento/Store/_files/core_fixturestore.php + */ + public function testProcessValidStoreCodeCase3() + { + /** @var \Magento\Store\Model\Store $store */ + $store = Bootstrap::getObjectManager()->get('Magento\Store\Model\Store'); + $store->load('fixturestore', 'code'); + + /** @var \Magento\Framework\App\RequestInterface $request */ + $request = Bootstrap::getObjectManager()->create( + 'Magento\Framework\App\RequestInterface', + ['directFrontNames' => [$store->getCode() => true]] + ); + + /** @var \Magento\Framework\App\Config\ReinitableConfigInterface $config */ + $config = Bootstrap::getObjectManager()->get('\Magento\Framework\App\Config\ReinitableConfigInterface'); + $config->setValue(Store::XML_PATH_STORE_IN_URL, true, ScopeInterface::SCOPE_STORE, $store->getCode()); + $pathInfo = sprintf('/%s/m/c/a', $store->getCode()); + $this->assertEquals($pathInfo, $this->pathProcessor->process($request, $pathInfo)); + $this->assertEquals('noroute', $request->getActionName()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php index 7863c4201bd73..c998094fc963a 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php @@ -5,7 +5,6 @@ */ namespace Magento\Test\Integrity\Modular; -use Magento\Framework\App\Filesystem\DirectoryList; class AclConfigFilesTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php index 79b6958842878..42b6a74d7e06d 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php @@ -92,7 +92,7 @@ public function linearFilesProvider() $output = []; foreach ($common as $path => $file) { - $output[$path] = [$file]; + $output[substr($path, strlen(BP))] = [$file]; } return $output; diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php index 5a330a83dbe83..f12917f9c456d 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php @@ -5,7 +5,6 @@ */ namespace Magento\Test\Integrity\Modular; -use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Filesystem; class IndexerConfigFilesTest extends \PHPUnit_Framework_TestCase @@ -51,13 +50,6 @@ public function testIndexerConfigFile($file) */ public function indexerConfigFileDataProvider() { - /** @var Filesystem $filesystem */ - $utilityFiles = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('\Magento\Framework\App\Utility\Files'); - - $utilityFiles->getConfigFiles('indexer.xml'); - - $dataProviderResult = $utilityFiles->getConfigFiles('indexer.xml'); - return $dataProviderResult; + return \Magento\Framework\App\Utility\Files::init()->getConfigFiles('indexer.xml'); } } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php index ca81ea4973a09..95a9bb0d8cb7b 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php @@ -36,7 +36,7 @@ public function viewConfigFileDataProvider() ->get('Magento\Framework\Component\DirSearch'); $files = $componentDirSearch->collectFiles(ComponentRegistrar::THEME, 'etc/view.xml'); foreach ($files as $file) { - $result[$file] = [$file]; + $result[substr($file, strlen(BP))] = [$file]; } return $result; } @@ -60,7 +60,7 @@ public function themeConfigFileExistsDataProvider() $componentRegistrar = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('\Magento\Framework\Component\ComponentRegistrar'); foreach ($componentRegistrar->getPaths(ComponentRegistrar::THEME) as $themeDir) { - $result[$themeDir] = [$themeDir]; + $result[substr($themeDir, strlen(BP))] = [$themeDir]; } return $result; } @@ -102,7 +102,7 @@ public function themeConfigFileDataProvider() ->get('Magento\Framework\Component\DirSearch'); $files = $componentDirSearch->collectFiles(ComponentRegistrar::THEME, 'theme.xml'); foreach ($files as $file) { - $result[$file] = [$file]; + $result[substr($file, strlen(BP))] = [$file]; } return $result; } diff --git a/lib/internal/Magento/Framework/App/Utility/Files.php b/lib/internal/Magento/Framework/App/Utility/Files.php index e19dd388fc6d3..7802320f6fc32 100644 --- a/lib/internal/Magento/Framework/App/Utility/Files.php +++ b/lib/internal/Magento/Framework/App/Utility/Files.php @@ -106,7 +106,7 @@ public static function composeDataSets(array $files) { $result = []; foreach ($files as $file) { - $result[$file] = [$file]; + $result[substr($file, strlen(BP))] = [$file]; } return $result; }