Version: latest
Bug Description
When you want to use DI in classes that are using SmartObject, and you define type of variable, magic function __set and __get (when getting) is called and SmartObject throws an exception, because variable is not public, there is also exception in &__get method.
Steps To Reproduce
Define data types in properties and inject them in a constcutror. I'm not sure if it is PHP bug or a new behaviour, this is example PHP code, __set is called when $this->testOne is initialised.
newclass(newclass() {}, newclass() {}) {
privateobject$testOne;
private$testTwo;
publicfunction__construct(
object$testOne, object$testTwo
) {
$this->testOne = $testOne;
$this->testTwo = $testTwo;
}
publicfunction__set(string$name, $value)
{
echo$name . ': ' . get_class($value) . PHP_EOL;
}
};Possible Solution
I'm not sure if it's a PHP bug (tested on php7.4beta-4), or it should happend, I didn't find any resources why is it happening.
Version: latest
Bug Description
When you want to use DI in classes that are using SmartObject, and you define type of variable, magic function __set and __get (when getting) is called and SmartObject throws an exception, because variable is not public, there is also exception in &__get method.
Steps To Reproduce
Define data types in properties and inject them in a constcutror. I'm not sure if it is PHP bug or a new behaviour, this is example PHP code, __set is called when $this->testOne is initialised.
Possible Solution
I'm not sure if it's a PHP bug (tested on php7.4beta-4), or it should happend, I didn't find any resources why is it happening.