atk4 / ui

Robust and easy to use PHP Framework for Web Apps
https://atk4-ui.readthedocs.io
MIT License
440 stars 104 forks source link

View::set() can be used to set content property only #2075

Closed mvorisek closed 1 year ago

mvorisek commented 1 year ago

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.