File tree Expand file tree Collapse file tree 7 files changed +11
-11
lines changed
Test/Unit/ViewModel/Customer
view/frontend/templates/js
lib/internal/Magento/Framework/App/PageCache Expand file tree Collapse file tree 7 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,11 @@ protected function setUp(): void
4040 }
4141
4242 /**
43- * Test json encode value.
43+ * Test serialize value.
4444 *
4545 * @return void
4646 */
47- public function testJsonEncode (): void
47+ public function testSerialize (): void
4848 {
4949 $ this ->jsonEncoderMock ->expects ($ this ->once ())
5050 ->method ('serialize ' )
@@ -60,7 +60,7 @@ function ($value) {
6060 'http://example.com/customer/section/load/ '
6161 ]
6262 ),
63- $ this ->model ->jsonEncode (['http://example.com/customer/section/load/ ' ])
63+ $ this ->model ->serialize (['http://example.com/customer/section/load/ ' ])
6464 );
6565 }
6666}
Original file line number Diff line number Diff line change @@ -31,6 +31,6 @@ public function __construct(
3131 */
3232 public function isLoggedIn (): bool |null
3333 {
34- return $ this ->httpContext ->getValue (Context::CONTEXT_AUTH );
34+ return $ this ->httpContext ->getValue (Context::CONTEXT_AUTH ) ?? false ;
3535 }
3636}
Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ public function __construct(
2424 }
2525
2626 /**
27- * Encode the mixed $valueToEncode into the JSON format
27+ * Encode the mixed $value into the JSON format
2828 *
29- * @param mixed $valueToEncode
29+ * @param mixed $value
3030 * @return string
3131 */
32- public function jsonEncode ( $ valueToEncode ): string
32+ public function serialize ( mixed $ value ): string
3333 {
34- return $ this ->jsonEncoder ->serialize ($ valueToEncode );
34+ return $ this ->jsonEncoder ->serialize ($ value );
3535 }
3636}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ $expirableSectionNames = $block->getExpirableSectionNames();
2323 "Magento_Customer/js/customer-data": {
2424 "sectionLoadUrl": "<?= $ block ->escapeJs ($ block ->getCustomerDataUrl ('customer/section/load ' )) ?> ",
2525 "expirableSectionLifetime": <?= (int )$ block ->getExpirableSectionLifetime () ?> ,
26- "expirableSectionNames": <?= /* @noEscape */ $ jsonSerializer ->jsonEncode (
26+ "expirableSectionNames": <?= /* @noEscape */ $ jsonSerializer ->serialize (
2727 $ expirableSectionNames
2828 ) ?> ,
2929 "cookieLifeTime": "<?= $ block ->escapeJs ($ block ->getCookieLifeTime ()) ?> ",
Original file line number Diff line number Diff line change 4747 <preference for =" Magento\PageCache\Model\VclGeneratorInterface" type =" Magento\PageCache\Model\Varnish\VclGenerator" />
4848 <preference for =" Magento\PageCache\Model\VclTemplateLocatorInterface" type =" Magento\PageCache\Model\Varnish\VclTemplateLocator" />
4949 <preference for =" Magento\PageCache\Model\Spi\PageCacheTagsPreprocessorInterface" type =" Magento\PageCache\Model\PageCacheTagsPreprocessorComposite" />
50- <preference for =" Magento\Framework\App\PageCache\IdentifierInterface" type =" Magento\Framework\App\PageCache\Identifier" />
5150</config >
Original file line number Diff line number Diff line change 20032003 </arguments >
20042004 </type >
20052005 <preference for =" Magento\Framework\Filter\Input\PurifierInterface" type =" Magento\Framework\Filter\Input\Purifier" />
2006+ <preference for =" Magento\Framework\App\PageCache\IdentifierInterface" type =" Magento\Framework\App\PageCache\Identifier" />
20062007</config >
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ class Kernel
7878 * @param \Magento\Framework\Serialize\SerializerInterface|null $serializer
7979 * @param AppState|null $state
8080 * @param \Magento\PageCache\Model\Cache\Type|null $fullPageCache
81- * @param \Magento\Framework\App\PageCache\IdentifierInterface $identifierForSave
81+ * @param \Magento\Framework\App\PageCache\IdentifierInterface $identifierForSave|null
8282 * @SuppressWarnings(PHPMD.ExcessiveParameterList)
8383 */
8484 public function __construct (
You can’t perform that action at this time.
0 commit comments