Questions tagged [deprecated]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

How can i overwrite file from vendor so that setup:di:compile won't read it

I have a 3rd party module that is giving some deprecation issues. Is there any way to replace the class that is having problems in my own module in app/code without moving the whole module from vendor?...
user avatar
0 votes
0 answers
26 views

Deprecated Functionality: Zend_Http_UserAgent implements the Serializable interface in magento2.4.4

I am facing "Deprecated Functionality: Zend_Http_UserAgent implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize()" Error in magento2.4.4 All ...
user avatar
1 vote
2 answers
2k views

Magento 2 :- Magento upgrade error 2.4.4 in php 8.1

When i run this command i got error php bin/magento maintenance:enable PHP Deprecated: Return type of phpseclib_mcrypt_filter::filter($in, $out, &$consumed, $closing) should either be ...
user avatar
1 vote
0 answers
61 views

Deprecated functions in Magento 2

There are lots of functions in magento 2 which are deprecated like Registry. Can anyone give me list of such functions or classes.
user avatar
  • 728
2 votes
1 answer
105 views

addNoticeMessage Vs addNotice : how pass URL in message with new function

I wanted to add notice to page with URL $this->messageManager->addNoticeMessage( __( 'Go to my account, <a href="%1"> My account</a>', ...
user avatar
1 vote
1 answer
3k views

User Deprecated Functionality: Session ID is not used as URL parameter anymore

i get the below error in magento Exception #0 (Exception): User Deprecated Functionality: Session ID is not used as URL parameter anymore. in /var/www/html/magento.loc/vendor/magento/framework/Url.php ...
user avatar
  • 13
0 votes
1 answer
154 views

Method 'delete' is deprecated

phpstorm IDE saing that method 'delete' is deprecated. Is there any alternatives? public function deleteVoucherStatus($entity_id) { $voucherStatus = $this->voucherStatusModelFactory-&...
user avatar
0 votes
1 answer
770 views

Magento 2.3 getResource is deprecated, what is the alternative?

I have a product attribute label get in category page below way. <?php $tablecolor = $_product->getResource()->getAttribute('xyz'); // attribute name $attrTestValue = $tablecolor->...
user avatar
  • 5,144
3 votes
0 answers
78 views

Deprecated Registry alternate using session or any other possibilities for 'Custom module'

In my case, I created Blog Module and in that while getting current_blog_post from URL's id, I register it in coreRegistry and use registry to get the value in various places. register is used in ...
user avatar
2 votes
2 answers
2k views

Registry deprecated in magento 2.3, How to set data without Registry?

I am creating a custom blog, in which I use the \Magento\Framework\Registry and it is deprecated. I searched for solution but I could only find the way to get the data without registry. Is there's ...
user avatar
  • 671
5 votes
2 answers
2k views

getResource is deprecated, what is the alternative?

getResource() is deprecated so my question is what do I need to use instead to be future proof for next updates. I use this function like below in the catalog list.phtml $seedBank = $_product->...
user avatar
  • 381
0 votes
1 answer
427 views

Magento 2 - php 7.2 - The each() function is deprecated in AbstractCollection.php

I am getting below error in Magento 2.1 using PHP 7.2. main.CRITICAL: Exception: Deprecated Functionality: The each() function is deprecated. This message will be suppressed on further calls in /...
user avatar
0 votes
1 answer
192 views

Magento 2 - Save deprecated

I try to create programmatically an integration in Magento 2. I follow this tutorial : https://magecomp.com/blog/create-activate-authorize-a-new-integration-programmatically-in-magento-2/ I have ...
user avatar
  • 924
2 votes
3 answers
4k views

How to get current product in Magento 2.3.1 without deprecations

Not a duplicate question, as the referenced original question uses deprecated classes. I want to get the current product in a Block / Model in Magento 2.3.1. I cannot directly use / inject / extend ...
user avatar
  • 502
2 votes
1 answer
587 views

How to load current product in Magento 2 without using deprecated functionality?

The core uses two deprecated classes to load the current product within the block class on the front end: \Magento\Catalog\Block\Product\AbstractProduct \Magento\Framework\Registry See: \Magento\...
user avatar
  • 2,078
3 votes
3 answers
4k views

Magento2 Alternate of Method getCollection() which is deprecated

I have checked the similar post: Magento2.2 getCollection from Factory deprecated But I still don't find the answer of it. I am calling getCollection() function, and PHPStorm saying that this ...
user avatar
  • 8,888
3 votes
1 answer
976 views

Magento 1 : each() function is deprecated

In Magento 1, I have been getting this error: Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /var/www/html/test/app/code/core/Mage/Eav/Model/...
user avatar
10 votes
6 answers
7k views

How to get current product in phtml without registry?

I would like to get my current product in my phtml. I saw lot of examples with registry in the Block file, but now, in M2.3, it's deprecated. Someone have an idea how to do ?
user avatar
  • 924
5 votes
3 answers
1k views

Save is deprecated when try to create attributes set

I try to create programmatically some attributes set. I find this code : $setup = $this->moduleDataSetup->getConnection(); $setup->startSetup(); $categorySetup = $this->...
user avatar
  • 924
1 vote
1 answer
365 views

Replacement for Cart (M2)

what's the best replace for \Magento\Checkout\Model\Cart $cart since this class Cart is deprecated ?
user avatar
2 votes
8 answers
4k views

Magento 2.3 idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated

I have Installed Fresh Magento2.3 php version 7.2.12 . When System try to send any email like order,contact,register customer etc .. . it will through Exception and not sending any email main....
user avatar
8 votes
5 answers
31k views

The each() function is deprecated. Magento 2 , php 7.2

I have been getting this error since I changed to PHP-7.2 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /var/www/html/vedic/vendor/...
user avatar
8 votes
1 answer
1k views

How to replace \Magento\Catalog\Block\Product\Context since it's deprecated?

In a custom module we extend \Magento\Catalog\Block\Product\ListProduct, so we need \Magento\Catalog\Block\Product\Context in our constructor. But as I can see, it has now been marked as deprecated ...
user avatar
  • 3,983
7 votes
2 answers
3k views

Magento2.2 getCollection from Factory deprecated

I get in my editor (PhPStorm) on getCollection the message that it is deprecated. In my controller i got the function public function __construct( Registry $registry, ...
user avatar
  • 581
4 votes
1 answer
2k views

Magento 2 + Reason behind deprecation of payment method class

In payment methods \Magento\Payment\Model\Method\AbstractMethod \Magento\Payment\Model\Method\Cc both are deprecated. In stead to extends both method now as per this link , we should ...
user avatar
  • 1,452
2 votes
0 answers
431 views

How to load facotry model load best practice?

class Product extends \Magento\Framework\View\Element\Template { protected $_productloader; public function __construct( \Magento\Framework\View\Element\Template\Context $context, ...
user avatar
1 vote
0 answers
7k views

REST API is deprecated for versions v2.1 and higher (12)

In the last days i got this error on my magento. Problems are on my checkout/onepage that returning to cart instead of success. I saw that it can be a facebook problem with the upgrade (after 7th aug ...
user avatar
  • 11
32 votes
2 answers
5k views

Magento 2 - Why is Magento\Checkout\Model\Cart deprecated?

Since Magento 2.1, Cart has a @deprecated tag. Nevertheless, it is still used by Magento itself to store products when shopping. Is the deprecation intended, and if so, and what should we use instead?
user avatar
58 votes
4 answers
23k views

Deprecated save and load methods in Abstract Model

I see that in the develop branch of the Magento 2 repo the methods load and save from Magento\Framework\Model\AbstractModel class are deprecated. But there are a gazillion classes in the core that ...
user avatar
  • 196k
0 votes
0 answers
583 views

Deprecated functionality: preg_replace()

Trying my instance of Magento on PHP 5.6 because my host is upgrading the server and everything seems to work well besides from this error message. Deprecated functionality: preg_replace(): The /e ...
user avatar
  • 2,439