Open markkap opened 6 years ago
seems like same needs to be done with call and unset
Where are you planning to deprecate these, on what classes?
FYI, our WPLib library when we use for client projects would not be possible without __call()
, and I can image useful architectures where there other magic methods are critical, and not code smells.
I will say that sometimes developers use them when they don't need to, but other times these methods are essential, such as when using containment vs. inheritance and delegating method calls and property gets/sets from the containing object to the contained object.
If a property needs to be accessed than it either should be defined as public, or provide a relevant public functions. Use of magic functions is a major code smell.
As this might break plugins and themes we should do it in several phases
WP_DEBUG
is on. Target is version 2.0WP_DEBUG
is on, notice otherwise. Target is version 3.0