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

[REF][PHP8.2] Convert dynamic property into a variable #25925

Merged
merged 1 commit into from
Mar 26, 2023

Conversation

braders
Copy link
Contributor

@braders braders commented Mar 26, 2023

Overview

Convert dynamic property _softIndividualId into a variable, as the value is only used within a single function.

Before

Use of dynamic property is deprecated in PHP 8.2.

After

Dynamic property is no longer used, a variable is used instead.

@civibot
Copy link

civibot bot commented Mar 26, 2023

(Standard links)

@civibot civibot bot added the master label Mar 26, 2023
@colemanw
Copy link
Member

I have to say, these old dynamic properties were quite troublesome. I think most of the time they were done that way out of loyalty to an established pattern (as if $this->_foo were somehow better than $foo) but they only served to confuse future devs trying to figure out if the variable could be removed or if it was secretly used from some other place that required it to be part of the class. Thanks for doing that detective work.

@colemanw colemanw merged commit a4f10bb into civicrm:master Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants