Skip to content

Commit 5e7f1bd

Browse files
committed
ACPT-1876: Create Cloud quality patch for Application Server known functional issue
1 parent 1a9238e commit 5e7f1bd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

patches.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@
413413
},
414414
"magento/module-catalog-graph-ql": {
415415
"AttributeReader should use Factory for Collection": {
416-
">=100.4.7 <100.4.7": "ACPT-1876__attribute_reader_should_use_factory_for_collection__2.4.7.patch"
416+
">=100.4.7 <100.4.8": "ACPT-1876__attribute_reader_should_use_factory_for_collection__2.4.7.patch"
417417
}
418418
}
419419
}

patches/ACPT-1876__attribute_reader_should_use_factory_for_collection__2.4.7.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ index ecd83bf61ef0..05acb97e4bd7 100644
2424
use Magento\Framework\GraphQl\Schema\Type\Entity\MapperInterface;
2525
@@ -36,9 +38,9 @@ class AttributeReader implements ReaderInterface
2626
private Type $typeLocator;
27-
27+
2828
/**
2929
- * @var Collection
3030
+ * @var CollectionFactory
3131
*/
3232
- private Collection $collection;
33-
+ private readonly CollectionFactory $collectionFactory;
33+
+ private CollectionFactory $collectionFactory;
3434

3535
/**
3636
* @var ScopeConfigInterface
@@ -58,15 +58,15 @@ index ecd83bf61ef0..05acb97e4bd7 100644
5858
+ $this->collectionFactory = $collectionFactory ?? ObjectManager::getInstance()->get(CollectionFactory::class);
5959
$this->config = $config;
6060
}
61-
61+
6262
@@ -74,12 +79,11 @@ public function __construct(
6363
public function read($scope = null) : array
6464
{
6565
$config = [];
6666
-
6767
if ($this->config->isSetFlag(self::XML_PATH_INCLUDE_DYNAMIC_ATTRIBUTES, ScopeInterface::SCOPE_STORE)) {
6868
$typeNames = $this->mapper->getMappedTypes(Product::ENTITY);
69-
69+
7070
/** @var Attribute $attribute */
7171
- foreach ($this->collection->getAttributes() as $attribute) {
7272
+ foreach ($this->collectionFactory->create()->getAttributes() as $attribute) {

0 commit comments

Comments
 (0)