gamee/nette-auto-registrator – automatically register classes into DIC

John Poe
Member | 3
+
+6
-

gamee/nette-auto-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)

stepos2
Member | 53
+
+1
-

How is it different from built-in Search Extension?

John Poe
Member | 3
+
+1
-

@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)

MajklNajt
Member | 498
+
0
-

John Poe wrote:

People can choose which one is more simple for them to use.

IMHO build-in extension will be always simpler for use beside extra composer package…

Marek Bartoš
Nette Blogger | 1275
+
+2
-

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
+
0
-

@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)