<?php
namespace Foo;
trait aTrait {
protected function one() {
echo "a-one";
}
}
namespace Bar;
use Foo\aTrait as bTrait;
trait aTrait {
use bTrait {
one as originalOne;
}
protected function one() {
echo "b-one";
$this->originalOne();
}
}
namespace Baz;
use Bar\atrait;
class Test {
use aTrait;
public function __construct() {
$this->one();
}
}
$test = new Test();
Fatal error: Trait method one has not been applied, because there are collisions with other trait methods on Baz\Test in /in/WU6Kt on line 37
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/WU6Kt on line 5
Process exited with code 255.