--- /dev/null
+--TEST--
+Bug #55137 (Changing trait static method visibility)
+--FILE--
+<?php
+
+trait A {
+ protected static function foo() { echo "abc\n"; }
+ private static function bar() { echo "def\n"; }
+}
+
+
+class B {
+ use A {
+ A::foo as public;
+ A::bar as public baz;
+ }
+}
+
+B::foo();
+B::baz();
+
+
+?>
+--EXPECT--
+abc
+def
if (!(aliases[i]->modifiers & ZEND_ACC_PPP_MASK)) {
fn_copy.common.fn_flags |= ZEND_ACC_PUBLIC;
}
+ fn_copy.common.fn_flags |= fn->common.fn_flags ^ (fn->common.fn_flags & ZEND_ACC_PPP_MASK);
}
lcname_len = aliases[i]->alias_len;
if (!(aliases[i]->modifiers & ZEND_ACC_PPP_MASK)) {
fn_copy.common.fn_flags |= ZEND_ACC_PUBLIC;
}
+ fn_copy.common.fn_flags |= fn->common.fn_flags ^ (fn->common.fn_flags & ZEND_ACC_PPP_MASK);
}
}
i++;