Closed mvorisek closed 1 year ago
View::set() method was historically coded to support too many usecases which made it very hard to override and satisfy LSP.
View::set()
Weak static analysis also allowed #2016 bug.
Thankfully, at least in atk4/ui, the misuse count was low.
The replacement is $this->template->set() and $this->setDefaults() (or $this->property = value) depending on the usecase.
$this->template->set()
$this->setDefaults()
$this->property = value
View::set()
method was historically coded to support too many usecases which made it very hard to override and satisfy LSP.Weak static analysis also allowed #2016 bug.
Thankfully, at least in atk4/ui, the misuse count was low.
The replacement is
$this->template->set()
and$this->setDefaults()
(or$this->property = value
) depending on the usecase.