Skip to content

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

Merged
mvorisek merged 1 commit intodevelopfrom
view_set_only_for_content
Jun 18, 2023
Merged

View::set() can be used to set content property only#2075
mvorisek merged 1 commit intodevelopfrom
view_set_only_for_content

Conversation

@mvorisek
Copy link
Copy Markdown
Member

@mvorisek mvorisek commented Jun 18, 2023

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.

@mvorisek mvorisek force-pushed the view_set_only_for_content branch from 364278f to 0b5f5f0 Compare June 18, 2023 12:08
@mvorisek mvorisek marked this pull request as ready for review June 18, 2023 12:09
@mvorisek mvorisek force-pushed the view_set_only_for_content branch from 02e8875 to d8c601d Compare June 18, 2023 12:14
@mvorisek mvorisek force-pushed the view_set_only_for_content branch from d8c601d to b19ccad Compare June 18, 2023 12:20
@mvorisek mvorisek merged commit a78b335 into develop Jun 18, 2023
@mvorisek mvorisek deleted the view_set_only_for_content branch June 18, 2023 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant