-
-
Notifications
You must be signed in to change notification settings - Fork 146
Closed
Description
Hi. Take this code:
class SomeObject
{
private $someProperty;
function __construct($someProperty)
{
$this->someProperty = $someProperty;
}
}
var_dump(\Nette\PhpGenerator\Helpers::createObject('SomeObject', ['someProperty' => 'test']));
Expected result:
object(SomeObject)[2]
private 'someProperty' => string 'test' (length=4)
Actual result:
object(SomeObject)[2]
private 'someProperty' => null
public 'someProperty' => string 'test' (length=4)
Its on master. I've found this bug when I wanted create service in DI extension and used:
$builder->addDefinition($this->prefix('someService'))
->setClass('SomeService', ['someProperty' => $value]);
Metadata
Metadata
Assignees
Labels
No labels