You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevent reducing visibility to private(namespace) in child classes
Ensure child classes cannot reduce the visibility of inherited public or
protected methods/properties to private(namespace). This would violate the
Liskov Substitution Principle.
Like private members, private(namespace) members are not inherited:
* Methods: Skip inheritance checks when parent method is private(namespace)
* Properties: Skip inheritance checks when parent property is private(namespace)
The existing visibility comparison logic (using ZEND_ACC_PPP_MASK bit values)
correctly prevents reducing public/protected to private(namespace).
Note: Defining a NEW private(namespace) method/property with the same name
as a parent's private(namespace) member is allowed, since namespace-private
members are not inherited.
0 commit comments