After upgrade to newer version of Nette 3.1 (on PHP 8.2) starts to appear this error message:
Error
Cannot access private property Nette\PhpGenerator\ClassType]::$methods
File: [.../vendor/olicek/form-selectize/src/SelectizeExtension.php:46]
36: // $builder = $this->getContainerBuilder();
37: // $builder->addDefinition($this->prefix('selectize'))
38: // ->setClass('\App\Form\Control\Selectize');
39: // }
40:
41:
42: public function afterCompile(Code\ClassType $class)
43: {
44: parent::afterCompile($class);
45:
46: $init = $class->methods['initialize'];
47: $config = $this->getConfig($this->defaults);
48: $init->addBody('\App\Form\Control\Selectize::register(?, ?);', ['addSelectize', $config]);
49: }
Nette\PhpGenerator class has changed a lot and doesn't have any $methods property anymore, so this doesn't work.
Is it possible to fix this, or is there any workaround (like manual register of component in Bootstrap class)?
After upgrade to newer version of Nette 3.1 (on PHP 8.2) starts to appear this error message:
Error
Cannot access private property Nette\PhpGenerator\ClassType]::$methods
File: [.../vendor/olicek/form-selectize/src/SelectizeExtension.php:46]
36:
// $builder = $this->getContainerBuilder();37:
// $builder->addDefinition($this->prefix('selectize'))38:
// ->setClass('\App\Form\Control\Selectize');39:
// }40:
41:
42:
public function afterCompile(Code\ClassType $class)43:
{44:
parent::afterCompile($class);45:
46:
$init = $class->methods['initialize'];47:
$config = $this->getConfig($this->defaults);48:
$init->addBody('\App\Form\Control\Selectize::register(?, ?);', ['addSelectize', $config]);49:
}Nette\PhpGenerator class has changed a lot and doesn't have any
$methodsproperty anymore, so this doesn't work.Is it possible to fix this, or is there any workaround (like manual register of component in Bootstrap class)?