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

mvc: fields should implement getCurrentValue() rather than __toString() #8163

Closed
wants to merge 1 commit into from

Conversation

fichtner
Copy link
Member

@fichtner fichtner commented Dec 23, 2024

To ease this effort avoid having derived classes implement both __toString and getCurrentValue for consistency across value return. Also only ever return strings (empty if not otherwise possible).

@fichtner
Copy link
Member Author

Included in #8162

@fichtner fichtner closed this Dec 23, 2024
@AdSchellevis
Copy link
Member

I think this is ok, the tricky/risky one is UpdateOnlyTextField if I'm not mistaken, but as long as the child class overwrites __String() we should be good.

public function __toString()
{
return "";
}

Although I do expect some impact in a couple of constraints (likely introduced here 8572171)

@fichtner
Copy link
Member Author

Thanks, let this sit till January when I can test better.

@fichtner fichtner deleted the base_to_string branch January 8, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants