Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 18, 2023

Conversation

mvorisek
Copy link
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