Unless the class being built is very simply you always need to pass constructor arguments which means you always have to do (new ObjectDefinition($identifier, SomeClass::class))->setConstructorArguments($arguments) – which is rather lengthy. Now you can just do new ObjectDefinition($identifier, SomeClass::class, $arguments).
With the removal of identifiers this even brings it down to new ObjectDefinition(SomeClass::class, $arguments) which almost negates the need for an object() function considering how short it is.
Unless the class being built is very simply you always need to pass constructor arguments which means you always have to do
(new ObjectDefinition($identifier, SomeClass::class))->setConstructorArguments($arguments)
– which is rather lengthy. Now you can just donew ObjectDefinition($identifier, SomeClass::class, $arguments)
.With the removal of identifiers this even brings it down to
new ObjectDefinition(SomeClass::class, $arguments)
which almost negates the need for anobject()
function considering how short it is.