David Grudl

Results 425 comments of David Grudl

Because eval is evil. DI compiler is unable to understand what it means. It relies on internal implementation details, like name `$service` etc…

@fprochazka see https://github.com/nette/di/pull/93#issue-129077391

> new syntaxes to solve I think it can be solved with current syntax (`::array_push(@self::$array, value)` in neon), but I am opended to enhance syntax.

Perhaps the solution would be to introduce less magic syntax, for example ``` setup: - '$service->onClick[] = ?'([@self, 'method']) # old way - ?php('$service->onClick[] = ?', [@self, 'method']) # new...

I think Callback::isStatic() may help https://api.nette.org/2.4/Nette.Utils.Callback.html

> Something about performace - would it be OK to use part of hash for files and other part for callbacks? I think there's no need for entirely separated hash....

That makes sense, but it must be done a little differently. I'll try write more later.

initialize() is not part of the DI container's responsibility and is actually part of the Configurator that calls it. The current form is a big compromise, but very functional and...