<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Fri, 29 Aug 2008 19:42:34 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPImpact Blog: Dependency Injection in Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/10702</guid>
      <link>http://www.phpdeveloper.org/news/10702</link>
      <description><![CDATA[<p>
The PHP::Impact blog has <a href="http://phpimpact.wordpress.com/2008/07/29/dependency-injection-in-zend-framework/">pointed out</a> that the Zend Framework has gotten even closer to having a true method for dependency injection in its applications - a proposal issued <a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Container+-+Bradley+Holt">for Zend_Container</a>.
</p>
<blockquote>
Bradley Holt has announced the creation of a new proposal <a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Container+-+Bradley+Holt">Zend_Container</a>, a simplified version of <a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Di+-+Federico+Cargnelutti">Zend_Di</a>. According to him, if the framework is going to have a dependency injection component this component needs to be as simple as possible, something along the lines of <a href="http://www.picocontainer.org/">PicoContainer</a>.
</blockquote>
<p>
The <a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Container+-+Bradley+Holt">proposal</a> seeks to replace the use of class-managed singletons and Zend_Registry, scope access to containers and use reflection to determine dependencies for items inside. The component has been given the go-ahead from the ZF team and development is already in process.
</p>]]></description>
      <pubDate>Tue, 29 Jul 2008 08:45:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ibuildings Blog: Dependency Injection and Zend Framework Controllers]]></title>
      <guid>http://www.phpdeveloper.org/news/10692</guid>
      <link>http://www.phpdeveloper.org/news/10692</link>
      <description><![CDATA[<p>
<i>Ian Barber</i> has <a href="http://www.ibuildings.com/blog/archives/1181-Dependency-Injection-and-Zend-Framework-Controllers.html">written up</a> a look at dependency injection as a part of the Zend Framework's controller functionality for the Ibuildings blog.
</p>
<blockquote>
<p>
Among the standard object oriented principles is favouring composition over inheritance, and there are plenty of design patterns that work along this line. However, one of the most useful day-to-day facets of the idea doesn't seem to get a lot of attention from PHP developers, namely dependency injection. 
</p>
<p>
The general idea is, that if your class depends on some other object, that object should be passed in rather than generated internally or retrieved via a global variable or singleton.
</p>
</blockquote>
<p>
He <a href="http://www.ibuildings.com/blog/archives/1181-Dependency-Injection-and-Zend-Framework-Controllers.html">shares  few ideas</a> on how you can use this method in the controller of a Zend Framework including the use of the Zend Registry and an Action Helper. Code snips are provided for reach to show you how it'd be done.
</p>]]></description>
      <pubDate>Mon, 28 Jul 2008 08:47:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Elizabeth Smith's Blog: The Great Compile Project]]></title>
      <guid>http://www.phpdeveloper.org/news/9766</guid>
      <link>http://www.phpdeveloper.org/news/9766</link>
      <description><![CDATA[<p>
<i>Elizabeth Smith</i> has set out on something she calls the <a href="http://elizabethmariesmith.com/2008/03/the-great-compile-project/">Great Compile Project</a> - her effort to get all dependencies for PHP and PECL compiled on (at the least) Visual Studio 2005 transparently and provided openly.
</p>
<blockquote>
Anyone crazy enough to help out is more than welcome. I'm currently working on the GTK dependency stack, which will hit quite a few PHP dependencies and PECL extension dependencies in the process. And yes I'd love to submit my hacks/fixes upstream, if someone could find me some information (where do you send libiconv patches?)
</blockquote>
<p>
<a href="http://elizabethmariesmith.com/2008/03/the-great-compile-project/">Her post</a> mentions some of the things she's already been working on to help further the cause - compiling various Open Source libraries, figuring out issues surrounding <a href="http://www.mingw.org/">MiniGW</a> and some examples of more complex dependency issues she's come across.
</p>]]></description>
      <pubDate>Mon, 10 Mar 2008 10:29:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Jones' Blog: Sending Mail with Solar]]></title>
      <guid>http://www.phpdeveloper.org/news/8278</guid>
      <link>http://www.phpdeveloper.org/news/8278</link>
      <description><![CDATA[<p>
<i>Paul Jones</i> has <a href="http://paul-m-jones.com/blog/?p=253">posted a new tutorial</a> about using the mail functionality of the <a href="http://www.solarphp.com">Solar framework</a> - the <a href="http://solarphp.com/package/Solar_Mail">Solar_Mail</a> and <a href="http://solarphp.com/package/Solar_Smtp">Solar_Stmp</a> packages.
</p>
<blockquote>
While each of these [PEAR Mail, PhpMailer, SwiftMailer, Zend_Mail] will work with <a href="http://solarphp.com/">Solar</a>, the new <a href="http://solarphp.com/package/Solar_Mail">Solar_Mail</a> and <a href="http://solarphp.com/package/Solar_Smtp">Solar_Smtp</a> packages work "natively", in that they support automatic configuration, locale and exception inheritance, and so on. Read on for some examples on how to use them.
</blockquote>
<p>
In <a href="http://paul-m-jones.com/blog/?p=253">his example</a> he sets up and sends a simple message, setting the contents of the email (sent as an HTML message). Since there's been much talk about the safety of a lot of the mailing systems in frameworks, <i>Paul</i> talks about how it's been secured from header injections, through safe attachments, and from a transport dependency-injection for SMTP. 
</p>
<p>
There's even a method included that lets you take the SMTP information out of the script and put it into the Solar configuration file to use in the entire application.
</p>]]></description>
      <pubDate>Wed, 18 Jul 2007 13:48:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Greg Beaver's Blog: Interesting, potentially critical bug in PEAR]]></title>
      <guid>http://www.phpdeveloper.org/news/6950</guid>
      <link>http://www.phpdeveloper.org/news/6950</link>
      <description><![CDATA[<p>
Following right on the heels of <a href="http://www.phpdeveloper.org/news/6932">a different PEAR problem</a>, <i>Greg Beaver</i> has posted about a <a href="http://greg.chiaraquartet.net/archives/158-interesting,-potentially-critical-bug-in-PEAR.html">similar PEAR-related issue</a> that could cause some serious problems for you and your installation.
</p>
<blockquote>
<p>
After investigating (which in my case meant briefly recalling from memory how PEAR actually validates dependencies), I remembered that PEAR validates dependencies twice, once prior to download, and once prior to installation. By the time the dependencies are sorted, PEAR assumes that the sort algorithm properly sorts things. 
</p>
<p>
This is actually a pretty reasonable assumption considering the unit tests that are in place to test this.  However, like all regression testing, the unit tests test boundaries and likely cases, but not all possible inputs.
</p>
</blockquote>
<p>
So, to try to figure out where things might have gone wrong, <i>Greg</i> <a href="http://greg.chiaraquartet.net/archives/158-interesting,-potentially-critical-bug-in-PEAR.html">does a little research</a> to find the problem. He discovers that it has to do with the order that the "subpackages" for the dependencies are installed, where the contents of those files are not removed correctly before installation, resulting in a file conflict.
</p>]]></description>
      <pubDate>Wed, 20 Dec 2006 13:16:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Greg Beaver's Blog: Be careful of PEAR 1.4.4 and older installs when uninstalling a package]]></title>
      <guid>http://www.phpdeveloper.org/news/6932</guid>
      <link>http://www.phpdeveloper.org/news/6932</link>
      <description><![CDATA[<p>
<i>Greg Beaver</i> has a <a href="http://greg.chiaraquartet.net/archives/157-Be-careful-of-PEAR-1.4.4-and-older-installs-when-uninstalling-a-package.html">warning</a> for those developers using an older version of PEAR (1.4.4 and older) and uninstalling packages - a bug that might cause issues from an unauthorized uninstallation.
</p>
<blockquote>
Recently, a curious bug was opened at pear.php.net for the PEAR package (<a href="http://pear.php.net/bugs/bug.php?id=9639">#9639</a>). In it, a user was able to uninstall the <a href="http://pear.php.net/Structures_DataGrid">Structures_DataGrid</a> package, even though all of its subpackages were installed, which should have prevented uninstallation.
</blockquote>
<p>
There's been a key update to the <a href="http://cvs.php.net/viewvc.cgi/pear-core/PEAR/DependencyDB.php?r1=1.28&r2=1.29">dependency module</a> that keeps this sort of thing from happening, but it's only in versions 1.4.5 and higher. <i>Greg</i> also recommends the reinstall of any packages that you've installed before and up to version 1.4.4 just to ensure that the dependency database is up to date.
</p>]]></description>
      <pubDate>Tue, 19 Dec 2006 09:45:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jakob Westhoff's Blog: Class dependency graph generation]]></title>
      <guid>http://www.phpdeveloper.org/news/6725</guid>
      <link>http://www.phpdeveloper.org/news/6725</link>
      <description><![CDATA[<p>
<i>Tobias Schlitt</i> has <a href="http://schlitt.info/applications/blog/index.php?/archives/510-eZ-Components-class-graph.html">posted about a script</a> that <a href="http://westhoffswelt.de">Jakob</a> has created to make class graphs from the existing PHP source in a directory.
</p>
<blockquote>
The resulting SVG is generated through GraphViz. He just ran the script on the <a href="http://ez.no/ezcomponents">eZ components</a>.
</blockquote>
<p>
It's a bash script that can run local to the machine and make the images as it speeds through your PHP code. <i>Jakob</i> mentions that the script it free for all, and offers a <a href="http://westhoffswelt.de/data/blog/classgraph/generate_class_graph.sh">direct download</a> from his page. You can see a more full-size example in the <a href="http://westhoffswelt.de/data/blog/ezc_classgraph/">current graphs</a> of the eZ components trunk.
</p>]]></description>
      <pubDate>Thu, 16 Nov 2006 16:34:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Richard Lord's Blog: PHP 5.2 - Nesting level too deep - recursive dependency?]]></title>
      <guid>http://www.phpdeveloper.org/news/6691</guid>
      <link>http://www.phpdeveloper.org/news/6691</link>
      <description><![CDATA[<p>
So, you've just upgraded to <a href="http://www.php.net/downloads.php">PHP 5.2</a> and all is going well until you come across a page in your application that gives the message "Nesting level too deep - recursive dependency?". With such a vague error message, you might have trouble locating the source of the problem. Thankfully, someone's already been there and <a href="http://www.bigroom.co.uk/blog/php-nesting-level-too-deep-recursive-dependency/">figured out the issue</a> - <i>Richard Lord</i>.
</p>
<blockquote>
I installed PHP 5.2 on one of my testing servers today and a couple of bits of code that previously worked fine in version 5.1.6 threw fatal errors in the new version. The error message was "Nesting level too deep - recursive dependency?" and it took a little time to track down the root of the problem. Here's what I'd done wrong.
</blockquote>
<p>
Basically, his problem was using the "non-strict" evaluation for checking if two objects were equal to each other (== instead of ===). This compares everything about them, down to the properties - even if they're references to other properties inside of the same class (which is where the problem lies).
</p>
<p>
So, the fix is simple - === instead of == when comparing those objects. You'll be happier for the change.
</p>]]></description>
      <pubDate>Mon, 13 Nov 2006 10:02:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Jones' Blog: Dependency Injection in Solar]]></title>
      <guid>http://www.phpdeveloper.org/news/5698</guid>
      <link>http://www.phpdeveloper.org/news/5698</link>
      <description><![CDATA[<p>
In light of some of the <a href="http://www.phpdeveloper.org/news/5694">current talk</a> about dependency injection in PHP applications, <i>Paul Jones</i> has jumped on it and has <a href="http://paul-m-jones.com/blog/?p=218">posted on his blog</a> about how his framework, <a href="http://solarphp.com/">Solar</a>, already supports it.
</p>
<blockquote>
<p>
Because it makes great use of dependecy injection, <a href="http://solarphp.com/">Solar</a> has a standardized form of generating/retrieving dependency objects using its <a href="http://solarphp.com/index.php/docs/read/Solar/dependency()">Solar::dependency() method</a>.
</p>
<p>
The callilng code sends the dependency params to the target object at construction time. The target object then passes those params through Solar::dependency() to retrieve or create the dependency object.
</p>
</blockquote>
<p>
<i>Paul</i> also <a href="http://paul-m-jones.com/blog/?p=218">briefly mentions</a> that the parameters passed in can be: an object (including the dependency object itself), a string, or an array (treated internally as parameters to create a new object).
</p>]]></description>
      <pubDate>Tue, 27 Jun 2006 06:29:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jeff Moore's Blog: Dependency Injection in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5694</guid>
      <link>http://www.phpdeveloper.org/news/5694</link>
      <description><![CDATA[<p>
In his <a href="http://www.procata.com/blog/archives/2006/06/26/dependency-injection-in-php/">latest blog post</a>, <i>Jeff Moore</i> adds a bit more background to his column in the <a href="http://www.phparch.com/issue.php?mid=82">newest issue</a> of php|architect covering "dependency injection".
</p>
<blockquote>
<p>
The June issue of PHP Architect is out. My column this month is on dependency injection, a topic which I've been warming up to lately.
</p>
<p>
First there was <a href="http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=396">CORBA</a>. Then insane complexity of CORBA was supplanted by the intolerable complexity of <a href="http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=398">EJB</a>. Influenced by an agile mindset and the power of Unit testing, a group of java programmers began to construct simpler alternatives to EJB. Thus, the inversion of control frameworks were born. Martin Fowler came along, clarified and renamed the pattern <a href="http://www.martinfowler.com/articles/injection.html">dependency injection</a>. This activity has originated in the Java world, but the pattern applies in PHP as well.
</p>
<p>
It is heartening to see an industry solve a problem over the course of a decade, moving from complex vendor driven middle-ware to simple patterns. The thing I like most about DI is how dead simple it really is.
</p>
</blockquote>
<p>
He <a href="http://www.procata.com/blog/archives/2006/06/26/dependency-injection-in-php/">goes on</a> to say that <i>Fowler</i>'s <a href="http://www.martinfowler.com/articles/injection.html">article</a> on the topic is a "must read" for anyone who will even be looking into dependency injection. He also mentions two issues he has with most of the other introductions - the examples they use and the "over-emphasis on the container".  
</p>
<p>
His goal in writing <a href="http://www.phparch.com/issue.php?mid=82">this month's column</a> was to help to avoid some of those problems while still keeping it relevant and easy to understand.
</p>]]></description>
      <pubDate>Tue, 27 Jun 2006 06:00:15 -0500</pubDate>
    </item>
  </channel>
</rss>
