title | issue | author | author_email | author_github |
---|---|---|---|---|
Fix setting null-data while expecting array on a StorefrontResponse |
NEXT-24082 |
Stephan Niewerth |
stephanniewerth |
- Added unit test for StorefrontResponse in
tests/unit/php/Storefront/Framework/Routing/StorefrontResponseTest.php
- Changed
src/Storefront/Framework/Routing/StorefrontResponse.php
to return an empty array ongetData()
if $data isnull
- Changed
src/Storefront/Framework/Routing/NotFound/NotFoundSubscriber.php
andsrc/Storefront/Framework/Cache/CacheStore.php
to set StorefrontResponse data to an empty array - Deprecated
setData()
usage as to strictly type parameter$data
asarray
insrc/Storefront/Framework/Routing/StorefrontResponse.php
with v6.6.0 - Deprecated property
$data
will be natively typed to array and initilized with[]
insrc/Storefront/Framework/Routing/StorefrontResponse.php
with v6.6.0 - Deprecated property
$context
will be natively typed as?SalesChannelContext
and initialized withnull
insrc/Storefront/Framework/Routing/StorefrontResponse.php
with v6.6.0 - Deprecated null coalesce in
getData
can be removed if $data is natively typed insrc/Storefront/Framework/Routing/StorefrontResponse.php
with v6.6.0