Enhanced syntax for NEON hashes
- David Grudl
- Nette Core | 8253
In Neon it is not possible to write this:
- item:
- sub
- sib
You have to do:
-
item:
- sub
- sib
What is benefit? In config you can write:
services:
- App\Helpers\LangResolver:
- setup: ...
- autowired: off
It would be nice if this will be possible too:
services:
- App\Helpers\LangResolver(args, ...)
- setup: ...
- autowired: off
- Vojtěch Dobeš
- Gold Partner | 1316
What I would personally love to see possible (my often usecase):
class
is magic placeholder for real name that the factory
creates according to @return
annotation. Using
parameters
for generated factories always ends in duplicating the
@return
annotation.
Last edited by vojtech.dobes (2014-02-13 14:12)
- David Matějka
- Moderator | 6445
@vojtech.dobes: Now you can set only
arguments without class
(create
),
So with this enhancement it will be only
- Vojtěch Dobeš
- Gold Partner | 1316
matej21 Yeah, I thought so but I was waiting for confirmation :). Great job!
- David Grudl
- Nette Core | 8253
mkoubik wrote:
Maybe I don't get it but what would be the new syntax for..
This should be valid, but only for indentation using spaces :-(