I try to solve this error:

main.CRITICAL: Deprecated Functionality: Creation of dynamic property VENDOR\MODULE\Model\RedsysFactory::$helper is deprecated in /var/www/vhosts/xxxxxx.com/httpdocs/app/code/VENDOR/MODULE/Model/FILE.php on line 71 [] [] main.ERROR: Please provide payment for the order. [] []

LINE 71 SAID: $this->helper = $helper;

I try to use this code:

 * Use the fully-qualified AllowDynamicProperties, otherwise the #[AllowDynamicProperties] attribute on "MyClass" WILL NOT WORK.
use \AllowDynamicProperties;

class MyClass

but don´t work

Any idea

  • hi dear, can you share the full code? Feb 12 at 5:08

1 Answer 1


Define the helper class like this

namespace ....

use Vendor\Modulename\Helper\Data;

class MyClass
    protected $helper;
    public function __construct(
        Data $helper
    ) {
        $this->helper = $helper;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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