You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is actually not a bug issue but coding issue. Confide as a facade uses many functions that are defined non-static.but they are static by nature. As I understand, Facades are best implemented as static classes and any other non-static features should be addressed within the namespace\class convention. This matter can be easily fixed just by defining most of the functions and parameters used by the Facade as static.
It truly speeds up development as referencing and completion and other IDE features will be instantly available and static methods and attributes are accessed faster in runtime too (not significant though).
I would do that myself (and actually did it for my own project) but I hesitate to suggest contributing since I'm new to opensource community and don't know too much about its conventions.
Thanks for your fantastic work!
The text was updated successfully, but these errors were encountered:
Yeah. In fact, if we take best practices by the book than you should not be using facades but injecting the actual instances where you are gonna use then. But this is just the "laravel way" for beginners. Also, static methods are untestable in PHP, that`s why, (if you take automated tests seriously) you should never write static methods.
Hi!
This is actually not a bug issue but coding issue. Confide as a facade uses many functions that are defined non-static.but they are static by nature. As I understand, Facades are best implemented as static classes and any other non-static features should be addressed within the namespace\class convention. This matter can be easily fixed just by defining most of the functions and parameters used by the Facade as static.
It truly speeds up development as referencing and completion and other IDE features will be instantly available and static methods and attributes are accessed faster in runtime too (not significant though).
I would do that myself (and actually did it for my own project) but I hesitate to suggest contributing since I'm new to opensource community and don't know too much about its conventions.
Thanks for your fantastic work!
The text was updated successfully, but these errors were encountered: