9

/**
 * Registry model. Used to manage values in registry
 *
 * Registry usage as a shared service introduces temporal, hard to detect coupling into system.
 * It's usage should be avoid. Use service classes or data providers instead.
 *
 * @api
 * @deprecated
 * @since 100.0.2
 */

https://www.mageplaza.com/devdocs/magento-2-registry-register.html

enter image description here

Who can show me a demo that use service classes or data providers instead.

thx.

4

Here you can find the way how to avoid usage of Registry - https://www.atwix.com/development/alternatives-for-deprecated-registry-class-magento-2-3/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.