gamee/nette-auto-registrator – automatically register classes into DIC
- John Poe
- Member | 3
gamee/nette-auto-registrator
- GitHub: https://github.com/…-registrator
Installation
composer require gamee/nette-auto-registrator
Prologue
We all know programmers are lazy. I am lazy. So I created an extension that allows you to scan given directories and register all clases within the directory. You can skip particular classes, you can skip files by regexp, you can skip directories by name or path. :)
Bonus: You can use this extension also from another extension. :)
Last edited by John Poe (2019-12-18 11:17)
- John Poe
- Member | 3
@stepos2 :D I didn't know about that one. Well I guess it didn't exist in previous versions of nette and it was not really spoken to the community.
So there are two of those extensions now. :) People can choose which one is more simple for them to use.
Last edited by John Poe (2019-12-18 12:55)
- Marek Bartoš
- Nette Blogger | 1261
Four extensions.
https://github.com/fmasa/auto-di
https://github.com/…v0.4.0/.docs#…
Last edited by Mabar (2019-12-18 13:45)
- John Poe
- Member | 3
@Mabar Oh that's good to know, thanks.
@MajklNajt I would be careful with the extra package. Mentioned vmasa/auto-di uses nette/robot-loader (extra package), SearchExtension also.
It would be interesting to measure performance of all those extensions though.
Last edited by John Poe (2019-12-18 14:20)