Skip to content

Commit 0b071e1

Browse files
committed
ACPT-1052: Some Luma Storefront Scenarios Are Broken
- fix failed tests
1 parent 921450e commit 0b071e1

File tree

14 files changed

+39
-26
lines changed

14 files changed

+39
-26
lines changed

app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@
1717
use Magento\Store\Api\Data\StoreInterface;
1818
use Magento\Store\Model\Store;
1919

20-
// phpcs:disable Magento2.Classes.AbstractApi
2120
/**
2221
* Class AbstractAction
2322
*
2423
* @api
2524
*
2625
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
26+
* phpcs:disable Magento2.Classes.AbstractApi
27+
* phpcs:disable Magento2.Annotation.MethodAnnotationStructure
2728
* @since 100.0.2
2829
*/
2930
abstract class AbstractAction implements ResetAfterRequestInterface

app/code/Magento/Catalog/Model/Product.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
267267

268268
/**
269269
* @var \Magento\Catalog\Api\ProductAttributeRepositoryInterface
270-
* @deprecated 102.0.6 @see Not used anymore due to performance issue (loaded all product attributes)
270+
* @deprecated 102.0.6
271+
* @see Not used anymore due to performance issue (loaded all product attributes)
271272
*/
272273
protected $metadataService;
273274

@@ -482,7 +483,8 @@ protected function _construct()
482483
*
483484
* @throws \Magento\Framework\Exception\LocalizedException
484485
* @return \Magento\Catalog\Model\ResourceModel\Product
485-
* @deprecated 102.0.6 @see \Magento\Catalog\Model\ResourceModel\Product
486+
* @deprecated 102.0.6
487+
* @see \Magento\Catalog\Model\ResourceModel\Product
486488
* @since 102.0.6
487489
*/
488490
protected function _getResource()
@@ -630,7 +632,8 @@ public function getUpdatedAt()
630632
*
631633
* @param bool $calculate
632634
* @return void
633-
* @deprecated 102.0.4 @see we don't recommend this approach anymore
635+
* @deprecated 102.0.4
636+
* @see we don't recommend this approach anymore
634637
*/
635638
public function setPriceCalculation($calculate = true)
636639
{

app/code/Magento/Catalog/Model/ProductRepository.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
/**
3939
* @inheritdoc
4040
*
41+
* phpcs:disable Magento2.Annotation.ClassPropertyPHPDocFormatting
42+
* phpcs:disable Magento2.Annotation.MethodAnnotationStructure
4143
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
4244
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
4345
* @SuppressWarnings(PHPMD.TooManyFields)
@@ -130,14 +132,14 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
130132
protected $fileSystem;
131133

132134
/**
133-
* @deprecated 103.0.2 @see nothing
135+
* @deprecated 103.0.2
134136
*
135137
* @var ImageContentInterfaceFactory
136138
*/
137139
protected $contentFactory;
138140

139141
/**
140-
* @deprecated 103.0.2 @see nothing
142+
* @deprecated 103.0.2
141143
*
142144
* @var ImageProcessorInterface
143145
*/
@@ -149,7 +151,7 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
149151
protected $extensionAttributesJoinProcessor;
150152

151153
/**
152-
* @deprecated 103.0.2 @see nothing
154+
* @deprecated 103.0.2
153155
*
154156
* @var \Magento\Catalog\Model\Product\Gallery\Processor
155157
*/
@@ -736,7 +738,7 @@ private function addExtensionAttributes(Collection $collection) : Collection
736738
/**
737739
* Helper function that adds a FilterGroup to the collection.
738740
*
739-
* @deprecated 102.0.0 @see nothing
741+
* @deprecated 102.0.0
740742
* @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
741743
* @param Collection $collection
742744
* @return void
@@ -795,7 +797,7 @@ private function getMediaGalleryProcessor()
795797
/**
796798
* Retrieve collection processor
797799
*
798-
* @deprecated 102.0.0 @see nothing
800+
* @deprecated 102.0.0
799801
* @return CollectionProcessorInterface
800802
*/
801803
private function getCollectionProcessor()

app/code/Magento/Catalog/Model/ResourceModel/Attribute/WebsiteAttributesSynchronizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function synchronize()
145145
*
146146
* @return bool
147147
*/
148-
public function isSynchronizationRequired()
148+
public function isSynchronizationRequired(): bool
149149
{
150150
return self::FLAG_REQUIRES_SYNCHRONIZATION === $this->flagManager->getFlagData(self::FLAG_NAME);
151151
}
@@ -223,7 +223,7 @@ private function processAttributeValues(array $attributeValueItems, $tableName)
223223
*
224224
* @param string $tableName
225225
* @yield array
226-
* @return void
226+
* @return \Generator
227227
*/
228228
private function fetchAttributeValues($tableName)
229229
{

app/code/Magento/Catalog/Model/ResourceModel/Product.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* @api
2525
* @SuppressWarnings(PHPMD.LongVariable)
2626
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
27+
* phpcs:disable Magento2.Annotation.MethodAnnotationStructure
2728
* @since 100.0.2
2829
*/
2930
class Product extends AbstractResource implements ResetAfterRequestInterface
@@ -221,7 +222,7 @@ protected function _getDefaultAttributes()
221222
/**
222223
* Retrieve product website identifiers
223224
*
224-
* @deprecated 102.0.0 @see we don't recommend this approach anymore
225+
* @deprecated 102.0.0
225226
* @param \Magento\Catalog\Model\Product|int $product
226227
* @return array
227228
*/

app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ class VariationHandler implements ResetAfterRequestInterface
5151

5252
/**
5353
* @var \Magento\CatalogInventory\Api\StockConfigurationInterface
54-
* @deprecated 100.1.0 @see MSI
54+
* @deprecated 100.1.0
55+
* @see MSI
5556
*/
5657
protected $stockConfiguration;
5758

app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurableRegularPrice.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ protected function getUsedProducts()
165165
* Retrieve Configurable Option Provider
166166
*
167167
* @return \Magento\ConfigurableProduct\Pricing\Price\ConfigurableOptionsProviderInterface
168-
* @deprecated 100.1.1 @see we don't recommend this approach anymore
168+
* @deprecated 100.1.1
169+
* @see we don't recommend this approach anymore
169170
*/
170171
private function getConfigurableOptionsProvider()
171172
{

app/code/Magento/Customer/Helper/Address.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* @api
2121
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2222
* @since 100.0.2
23+
* phpcs:disable Magento2.Annotation.ClassPropertyPHPDocFormatting
24+
* phpcs:disable Generic.CodeAnalysis.EmptyStatement.DetectedFunction
2325
*/
2426
class Address extends \Magento\Framework\App\Helper\AbstractHelper implements ResetAfterRequestInterface
2527
{
@@ -83,7 +85,7 @@ class Address extends \Magento\Framework\App\Helper\AbstractHelper implements Re
8385
/**
8486
* @var CustomerMetadataInterface
8587
*
86-
* @deprecated 101.0.0 @see nothing
88+
* @deprecated 101.0.0
8789
*/
8890
protected $_customerMetadataService;
8991

@@ -126,7 +128,6 @@ public function __construct(
126128
/**
127129
* Addresses url
128130
*
129-
* phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedFunction
130131
* @return void
131132
*/
132133
public function getBookUrl()
@@ -136,7 +137,6 @@ public function getBookUrl()
136137
/**
137138
* Retrieve edit url.
138139
*
139-
* phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedFunction
140140
* @return void
141141
*/
142142
public function getEditUrl()
@@ -146,7 +146,6 @@ public function getEditUrl()
146146
/**
147147
* Retrieve delete url.
148148
*
149-
* phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedFunction
150149
* @return void
151150
*/
152151
public function getDeleteUrl()
@@ -156,7 +155,6 @@ public function getDeleteUrl()
156155
/**
157156
* Retrieve create url.
158157
*
159-
* phpcs:ignore Generic.CodeAnalysis.EmptyStatement
160158
* @return void
161159
*/
162160
public function getCreateUrl()
@@ -287,7 +285,7 @@ public function getAttributeValidationClass($attributeCode)
287285
: $this->_addressMetadataService->getAttributeMetadata($attributeCode);
288286

289287
$class = $attribute ? $attribute->getFrontendClass() : '';
290-
} catch (NoSuchEntityException $e) {
288+
} catch (NoSuchEntityException $e) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCATCH
291289
// the attribute does not exist so just return an empty string
292290
}
293291

app/code/Magento/GraphQl/Model/Query/Resolver/Context.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
/**
1414
* Do not use this class. It was kept for backward compatibility.
1515
*
16-
* @deprecated 100.3.3 @see \Magento\GraphQl\Model\Query\Context
16+
* @deprecated 100.3.3
17+
* @see \Magento\GraphQl\Model\Query\Context
1718
*/
1819
class Context extends \Magento\Framework\Model\AbstractExtensibleModel implements ContextInterface
1920
{

app/code/Magento/Sales/Model/OrderRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* Repository class
3030
*
3131
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
32+
* phpcs:disable Magento2.Annotation.MethodAnnotationStructure
3233
*/
3334
class OrderRepository implements \Magento\Sales\Api\OrderRepositoryInterface, ResetAfterRequestInterface
3435
{

0 commit comments

Comments
 (0)