Deprecated get|setInject?

2 years ago

amik
Member | 124
+
0
-

Hi,
why is this line (and the same for getInject()) commented out? Are these methods planned to be deprecated, or they were un-deprecated or why?

https://github.com/…finition.php#L329

I'm just curious as I just noticed this when writing a new extension (and this is why I don't like commented out code without including explanation :) )

2 years ago

mrtnzlml
Member | 145
+
+1
-

Yes, it will be probably deprecated. See: https://github.com/…/di/pull/135

2 years ago

Tomáš Votruba
Moderator | 1154
+
0
-

@amik Just wondering, where do you need the inject? Could you share the code?

Last edited by Tomáš Votruba (2017-01-07 18:20)

2 years ago

amik
Member | 124
+
+1
-

@TomášVotruba I don't, I was just studying how some Kdyby extensions work and noticed setInject(FALSE) :) so I was trying to figure out how it should be properly (not) used now.

2 years ago

Tomáš Votruba
Moderator | 1154
+
0
-

@amik I see, that confused me a lot few years ago too :)
Let me know when your extension is ready. I can code-review it if you like.