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

2 months ago

John Poe
Member | 3
+
+5
-

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)

2 months ago

stepos2
Backer | 3
+
+1
-

How is it different from built-in Search Extension?

2 months ago

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)

2 months ago

MajklNajt
Member | 300
+
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…

2 months ago

Mabar
Member | 226
+
+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)

2 months ago

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)