News Archive
PhpRiot Newsletter
Your Email Address:

More information

Object Scoping: A Triste Against Service Containers

Note: This article was originally published at Planet PHP on 23 August 2012.
Planet PHP
Yesterday, I got in an interesting conversation on twitter about object scopes and what constitutes a global scope. The discussion started around a piece of code that I stumbled upon from Fuel 2.0. I am a firm believer that service containers are not a form of Dependency Injection, and are only slightly better than global variables. That led me to make a few comments thatAelicitedAa reply from two Fuel developers. That led to a rather interesting debate that just couldn't fit into 140 characters... So I'm going to go into topics that are tightly related: variable scoping and service locators.Read more A