Questions tagged [deprecated]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
96 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 ...
2
votes
1answer
57 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\...
2
votes
3answers
243 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 ...
3
votes
1answer
361 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/...
4
votes
3answers
425 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 ?
4
votes
3answers
230 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->...
1
vote
0answers
59 views

Replacement for Cart (M2)

what's the best replace for \Magento\Checkout\Model\Cart $cart since this class Cart is deprecated ?
0
votes
0answers
30 views

Magento2 Product Custom Attribute needs load()

Q1. Why does getData() return null, I need to do load() first? They seem to be the same class type.. function (Magento\Catalog\Model\Product $product): $product->getData('my_attribute_1'); //...
0
votes
2answers
587 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....
6
votes
5answers
15k 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/...
6
votes
1answer
415 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 ...
6
votes
1answer
1k 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, ...
3
votes
1answer
940 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 ...
2
votes
0answers
403 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, ...
1
vote
0answers
5k 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 ...
31
votes
2answers
3k 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?
55
votes
4answers
14k 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 ...
0
votes
0answers
459 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 ...