File tree Expand file tree Collapse file tree 4 files changed +24
-22
lines changed
Model/Config/Cache/Tag/Strategy Expand file tree Collapse file tree 4 files changed +24
-22
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,10 @@ public function __construct(
3333 */
3434 public function generateTags (ValueInterface $ config ): array
3535 {
36- $ tags = [];
36+ $ tagsArray = [];
3737 foreach ($ this ->tagGenerators as $ tagGenerator ) {
38- $ tags = array_merge ( $ tags , $ tagGenerator ->generateTags ($ config) );
38+ $ tagsArray [] = $ tagGenerator ->generateTags ($ config );
3939 }
40- return $ tags ;
40+ return array_merge (... $ tagsArray ) ;
4141 }
4242}
Original file line number Diff line number Diff line change 55 */
66declare (strict_types=1 );
77
8- namespace Magento \StoreGraphQl \Model \Cache \Tag \Strategy ;
8+ namespace Magento \Store \Model \ Config \Cache \Tag \Strategy ;
99
1010use Magento \Framework \App \Cache \Tag \StrategyInterface ;
1111use Magento \Framework \App \Config \ValueInterface ;
12- use Magento \Store \Model \Config \Cache \Tag \Strategy \TagGeneratorInterface ;
1312
1413/**
1514 * Produce cache tags for store config.
1615 */
1716class StoreConfig implements StrategyInterface
1817{
1918 /**
20- * @var \Magento\Store\Model\Config\Cache\Tag\Strategy\ TagGeneratorInterface
19+ * @var TagGeneratorInterface
2120 */
2221 private $ tagGenerator ;
2322
23+ /**
24+ * @param TagGeneratorInterface $tagGenerator
25+ */
2426 public function __construct (
2527 TagGeneratorInterface $ tagGenerator
2628 ) {
Original file line number Diff line number Diff line change 457457 </argument >
458458 </arguments >
459459 </type >
460+ <type name =" Magento\Framework\App\Cache\Tag\Strategy\Factory" >
461+ <arguments >
462+ <argument name =" customStrategies" xsi : type =" array" >
463+ <item name =" Magento\Framework\App\Config\ValueInterface" xsi : type =" object" >
464+ Magento\Store\Model\Config\Cache\Tag\Strategy\StoreConfig
465+ </item >
466+ </argument >
467+ </arguments >
468+ </type >
469+ <type name =" Magento\Store\Model\Config\Cache\Tag\Strategy\StoreConfig" >
470+ <arguments >
471+ <argument name =" tagGenerator" xsi : type =" object" >
472+ Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator
473+ </argument >
474+ </arguments >
475+ </type >
460476</config >
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:ObjectManager/etc/config.xsd" >
9- <type name =" Magento\Framework\App\Cache\Tag\Strategy\Factory" >
10- <arguments >
11- <argument name =" customStrategies" xsi : type =" array" >
12- <item name =" Magento\Framework\App\Config\ValueInterface" xsi : type =" object" >
13- Magento\StoreGraphQl\Model\Cache\Tag\Strategy\StoreConfig
14- </item >
15- </argument >
16- </arguments >
17- </type >
18- <type name =" Magento\StoreGraphQl\Model\Cache\Tag\Strategy\StoreConfig" >
19- <arguments >
20- <argument name =" tagGenerator" xsi : type =" object" >
21- Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator
22- </argument >
23- </arguments >
24- </type >
259 <type name =" Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator" >
2610 <arguments >
2711 <argument name =" tagGenerators" xsi : type =" array" >
You can’t perform that action at this time.
0 commit comments