Skip to content

Commit 4175659

Browse files
author
Oleksandr Gorkun
committed
MAGETWO-96975: Remove __sleep and __wakeup from code
1 parent f4499ec commit 4175659

File tree

27 files changed

+54
-0
lines changed

27 files changed

+54
-0
lines changed

app/code/Magento/Authorization/Model/Role.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function __construct( //phpcs:ignore Generic.CodeAnalysis.UselessOverridi
5858
*/
5959
public function __sleep()
6060
{
61+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
6162
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
6263

6364
$properties = parent::__sleep();
@@ -72,6 +73,7 @@ public function __sleep()
7273
*/
7374
public function __wakeup()
7475
{
76+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
7577
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
7678

7779
parent::__wakeup();

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,7 @@ public function afterDelete()
852852
*/
853853
public function __sleep()
854854
{
855+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
855856
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
856857

857858
$this->unsetData('entity_type');
@@ -870,6 +871,7 @@ public function __sleep()
870871
*/
871872
public function __wakeup()
872873
{
874+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
873875
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
874876

875877
parent::__wakeup();

app/code/Magento/Config/Model/Config/Backend/Encrypted.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function __construct(
5454
*/
5555
public function __sleep()
5656
{
57+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
5758
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
5859

5960
$properties = parent::__sleep();
@@ -70,6 +71,7 @@ public function __sleep()
7071
*/
7172
public function __wakeup()
7273
{
74+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
7375
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
7476

7577
parent::__wakeup();

app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable/Attribute.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ public function setProductId($value)
270270
*/
271271
public function __sleep()
272272
{
273+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
273274
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
274275

275276
return array_diff(
@@ -286,6 +287,7 @@ public function __sleep()
286287
*/
287288
public function __wakeup()
288289
{
290+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
289291
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
290292

291293
parent::__wakeup();

app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Type/Configurable/Attribute/Collection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ protected function getIncludedOptions(array $usedProducts, AbstractAttribute $pr
363363
*/
364364
public function __sleep()
365365
{
366+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
366367
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
367368

368369
return array_diff(
@@ -387,6 +388,7 @@ public function __sleep()
387388
*/
388389
public function __wakeup()
389390
{
391+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
390392
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
391393

392394
parent::__wakeup();

app/code/Magento/Customer/Model/Attribute.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ public function canBeFilterableInGrid()
208208
*/
209209
public function __sleep()
210210
{
211+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
211212
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
212213

213214
$this->unsetData('entity_type');
@@ -225,6 +226,7 @@ public function __sleep()
225226
*/
226227
public function __wakeup()
227228
{
229+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
228230
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
229231

230232
parent::__wakeup();

app/code/Magento/Eav/Model/Entity/Attribute.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ public function getIdentities()
495495
*/
496496
public function __sleep()
497497
{
498+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
498499
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
499500

500501
$this->unsetData('attribute_set_info');
@@ -513,6 +514,7 @@ public function __sleep()
513514
*/
514515
public function __wakeup()
515516
{
517+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
516518
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
517519

518520
parent::__wakeup();

app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,7 @@ public function setExtensionAttributes(\Magento\Eav\Api\Data\AttributeExtensionI
14111411
*/
14121412
public function __sleep()
14131413
{
1414+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
14141415
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
14151416

14161417
return array_diff(
@@ -1441,6 +1442,7 @@ public function __sleep()
14411442
*/
14421443
public function __wakeup()
14431444
{
1445+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
14441446
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
14451447

14461448
parent::__wakeup();

app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ public function getValidAttributeIds($attributeIds)
731731
*/
732732
public function __sleep()
733733
{
734+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
734735
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
735736

736737
$properties = parent::__sleep();
@@ -749,6 +750,7 @@ public function __sleep()
749750
*/
750751
public function __wakeup()
751752
{
753+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
752754
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
753755

754756
parent::__wakeup();

app/code/Magento/Store/Model/Store.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ public function __construct(
429429
*/
430430
public function __sleep()
431431
{
432+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
432433
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
433434

434435
$properties = parent::__sleep();
@@ -446,6 +447,7 @@ public function __sleep()
446447
*/
447448
public function __wakeup()
448449
{
450+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
449451
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
450452

451453
parent::__wakeup();

0 commit comments

Comments
 (0)