Skip to content

Commit 651928c

Browse files
Merge pull request #9345 from magento-gl/novcommpr-2
[Bluetooth] Community Pull Requests delivery Nov-2
2 parents 55615e6 + a85e436 commit 651928c

File tree

21 files changed

+272
-227
lines changed

21 files changed

+272
-227
lines changed

app/code/Magento/Catalog/etc/di.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2013 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
@@ -73,7 +73,6 @@
7373
<preference for="Magento\Catalog\Model\Indexer\Product\Price\UpdateIndexInterface" type="Magento\Catalog\Model\Indexer\Product\Price\InvalidateIndex" />
7474
<preference for="Magento\Catalog\Model\Product\Gallery\ImagesConfigFactoryInterface" type="Magento\Catalog\Model\Product\Gallery\ImagesConfigFactory" />
7575
<preference for="Magento\Catalog\Model\Product\Configuration\Item\ItemResolverInterface" type="Magento\Catalog\Model\Product\Configuration\Item\ItemResolverComposite" />
76-
<preference for="Magento\Catalog\Api\Data\MassActionInterface" type="Magento\Catalog\Model\MassAction" />
7776
<preference for="Magento\Catalog\Model\ProductLink\Data\ListCriteriaInterface" type="Magento\Catalog\Model\ProductLink\Data\ListCriteria" />
7877
<preference for="Magento\Catalog\Api\CategoryListDeleteBySkuInterface" type="Magento\Catalog\Model\CategoryLinkRepository"/>
7978
<preference for="Magento\Theme\CustomerData\MessagesProviderInterface" type="Magento\Catalog\Model\Theme\CustomerData\MessagesProvider"/>

app/code/Magento/Directory/Model/AllowedCountries.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2016 Adobe
4+
* All Rights Reserved.
55
*/
66

77
namespace Magento\Directory\Model;
@@ -18,7 +18,7 @@
1818
*/
1919
class AllowedCountries
2020
{
21-
const ALLOWED_COUNTRIES_PATH = 'general/country/allow';
21+
public const ALLOWED_COUNTRIES_PATH = 'general/country/allow';
2222

2323
/**
2424
* @var ScopeConfigInterface
@@ -47,7 +47,7 @@ public function __construct(
4747
* Retrieve all allowed countries for scope or scopes
4848
*
4949
* @param string $scope
50-
* @param string|null $scopeCode
50+
* @param string|null|array $scopeCode
5151
* @return array
5252
* @since 100.1.2
5353
*/

app/code/Magento/GoogleGtag/etc/csp_whitelist.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2022 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -19,9 +19,9 @@
1919
</policy>
2020
<policy id="connect-src">
2121
<values>
22-
<value id="google_ad_services" type="host">www.googleadservices.com</value>
23-
<value id="google_analytics" type="host">www.google-analytics.com</value>
24-
<value id="google_analytics_4" type="host">analytics.google.com</value>
22+
<value id="google_ad_services" type="host">www.googleadservices.com</value>
23+
<value id="google_analytics" type="host">*.google-analytics.com</value>
24+
<value id="google_analytics_4" type="host">*.analytics.google.com</value>
2525
<value id="google_tag_manager" type="host">www.googletagmanager.com</value>
2626
</values>
2727
</policy>
@@ -32,12 +32,12 @@
3232
</policy>
3333
<policy id="img-src">
3434
<values>
35-
<value id="google_ad_services_pixel" type="host">googleads.g.doubleclick.net</value>
36-
<value id="google_ad_services_conversion" type="host">www.google.com</value>
37-
<value id="google_ad_services_bid" type="host">bid.g.doubleclick.net</value>
35+
<value id="google_ad_services_pixel" type="host">googleads.g.doubleclick.net</value>
36+
<value id="google_ad_services_conversion" type="host">www.google.com</value>
37+
<value id="google_ad_services_bid" type="host">bid.g.doubleclick.net</value>
3838
<value id="google_ad_services" type="host">www.googleadservices.com</value>
39-
<value id="google_analytics" type="host">www.google-analytics.com</value>
40-
<value id="google_analytics_4" type="host">analytics.google.com</value>
39+
<value id="google_analytics" type="host">*.google-analytics.com</value>
40+
<value id="google_analytics_4" type="host">*.analytics.google.com</value>
4141
<value id="google_tag_manager" type="host">www.googletagmanager.com</value>
4242
</values>
4343
</policy>

app/code/Magento/RemoteStorage/etc/di.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<?xml version="1.0"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2020 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
99
<preference for="Magento\RemoteStorage\Driver\Adapter\Cache\CacheInterface" type="Magento\RemoteStorage\Driver\Adapter\Cache\Generic"/>
1010
<preference for="Magento\RemoteStorage\Driver\Adapter\CachedAdapterInterface" type="Magento\RemoteStorage\Driver\Adapter\CachedAdapter"/>
1111
<preference for="Magento\RemoteStorage\Driver\Adapter\MetadataProviderInterface" type="Magento\RemoteStorage\Driver\Adapter\MetadataProvider"/>
12-
<preference for="Magento\RemoteStorage\Driver\Adapter\MetadataProviderFactoryInterface" type="Magento\RemoteStorage\Driver\Adapter\MetadataProviderFactory"/>
1312
<preference for="Magento\Framework\Filesystem\DriverPool" type="Magento\RemoteStorage\Driver\DriverPool"/>
1413
<preference for="Magento\Framework\File\Uploader" type="Magento\RemoteStorage\Model\File\Uploader"/>
1514
<virtualType name="remoteWriteFactory" type="Magento\Framework\Filesystem\Directory\WriteFactory">

app/etc/di.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2013 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
@@ -82,7 +82,6 @@
8282
<preference for="Magento\Framework\Json\DecoderInterface" type="Magento\Framework\Json\Decoder" />
8383
<preference for="Magento\Framework\Message\ManagerInterface" type="Magento\Framework\Message\Manager" />
8484
<preference for="Magento\Framework\App\Config\ValueInterface" type="Magento\Framework\App\Config\Value" />
85-
<preference for="Magento\Framework\Interception\ChainInterface" type="Magento\Framework\Interception\Chain\Chain" />
8685
<preference for="Magento\Framework\Module\Output\ConfigInterface" type="Magento\Framework\Module\Output\Config" />
8786
<preference for="Magento\Framework\View\Design\Theme\CustomizationInterface" type="Magento\Framework\View\Design\Theme\Customization" />
8887
<preference for="Magento\Framework\View\Asset\ConfigInterface" type="Magento\Framework\View\Asset\Config" />

dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22
/**
3+
* Copyright 2011 Adobe
4+
* All Rights Reserved.
5+
*
36
* Obsolete classes
47
*
58
* Format: array(<class_name>[, <replacement>])
69
*
710
* @codingStandardsIgnoreFile
8-
*
9-
* Copyright © Magento, Inc. All rights reserved.
10-
* See COPYING.txt for license details.
1111
*/
1212
return [
1313
['Mage_Admin_Helper_Data', 'Magento\Backend\Helper\Data'],
@@ -2845,7 +2845,7 @@
28452845
['Magento\Framework\Stdlib\CookieManager', 'Magento\Framework\Stdlib\CookieManagerInterface'],
28462846
['Magento\Framework\Interception\PluginList', 'Magento\Framework\Interception\PluginListInterface'],
28472847
['Magento\Framework\Interception\Config', 'Magento\Framework\Interception\ConfigInterface'],
2848-
['Magento\Framework\Interception\Chain', 'Magento\Framework\Interception\ChainInterface'],
2848+
['Magento\Framework\Interception\Chain'],
28492849
['Magento\Framework\Interception\Definition', 'Magento\Framework\Interception\DefinitionInterface'],
28502850
['Magento\Framework\ObjectManager\Factory', 'Magento\Framework\ObjectManager\FactoryInterface'],
28512851
['Magento\Framework\ObjectManager\Config', 'Magento\Framework\ObjectManager\ConfigInterface'],

lib/internal/Magento/Framework/Css/PreProcessor/Adapter/Less/Processor.php

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2015 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Framework\Css\PreProcessor\Adapter\Less;
77

8+
use Magento\Framework\App\Filesystem\DirectoryList;
9+
use Magento\Framework\App\ObjectManager;
810
use Magento\Framework\App\State;
911
use Magento\Framework\Css\PreProcessor\File\Temporary;
1012
use Magento\Framework\Phrase;
@@ -16,6 +18,8 @@
1618

1719
/**
1820
* Class Processor
21+
*
22+
* Process LESS files into CSS
1923
*/
2024
class Processor implements ContentProcessorInterface
2125
{
@@ -39,24 +43,32 @@ class Processor implements ContentProcessorInterface
3943
*/
4044
private $temporaryFile;
4145

46+
/**
47+
* @var DirectoryList
48+
*/
49+
private DirectoryList $directoryList;
50+
4251
/**
4352
* Constructor
4453
*
4554
* @param LoggerInterface $logger
4655
* @param State $appState
4756
* @param Source $assetSource
4857
* @param Temporary $temporaryFile
58+
* @param ?DirectoryList $directoryList
4959
*/
5060
public function __construct(
5161
LoggerInterface $logger,
5262
State $appState,
5363
Source $assetSource,
54-
Temporary $temporaryFile
64+
Temporary $temporaryFile,
65+
?DirectoryList $directoryList = null,
5566
) {
5667
$this->logger = $logger;
5768
$this->appState = $appState;
5869
$this->assetSource = $assetSource;
5970
$this->temporaryFile = $temporaryFile;
71+
$this->directoryList = $directoryList ?: ObjectManager::getInstance()->get(DirectoryList::class);
6072
}
6173

6274
/**
@@ -66,10 +78,19 @@ public function processContent(File $asset)
6678
{
6779
$path = $asset->getPath();
6880
try {
81+
$mode = $this->appState->getMode();
82+
$sourceMapBasePath = sprintf(
83+
'%s/pub/',
84+
$this->directoryList->getPath(DirectoryList::TEMPLATE_MINIFICATION_DIR),
85+
);
86+
6987
$parser = new \Less_Parser(
7088
[
7189
'relativeUrls' => false,
72-
'compress' => $this->appState->getMode() !== State::MODE_DEVELOPER
90+
'compress' => $mode !== State::MODE_DEVELOPER,
91+
'sourceMap' => $mode === State::MODE_DEVELOPER,
92+
'sourceMapRootpath' => '/',
93+
'sourceMapBasepath' => $sourceMapBasePath,
7394
]
7495
);
7596

0 commit comments

Comments
 (0)