<?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, 24 May 2013 06:53:00 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Andrew Podner: Intro to PHP Comments and Docblocks]]></title>
      <guid>http://www.phpdeveloper.org/news/19096</guid>
      <link>http://www.phpdeveloper.org/news/19096</link>
      <description><![CDATA[<p>
If you've ever looked at your code an wondered about its commenting, if there was a kind of "best practice" to follow when it comes to its structure, you should <a href="http://unassumingphp.com/intro-to-php-comments-and-docblocks/">read this article</a> from <i>Andrew Podner</i> about docblocks.
</p>
<blockquote>
The subject is how to properly document code with PHP comments and docblocks.  This one took a while for me to really just accept as a part of the development process.  To me now, the comments are now just as much a part of the application as the code is.  I believe it is that important.  With IDE's today, there really is no reason not to have good documentation in your source code.
</blockquote>
<p>
He talks some about his own reluctance at first to use comments and how it helped him remember what his thought process was behind parts of this code. He includes an example of a typical docblock structure, showing the general description, parameters and a "return" value. He also includes something interesting in the topic of documentation - good variable names. There's links included to two tools that can take these standardized comments from your code and build HTML documentation from it - <a href="http://phpdoc.org/">phpDocumentor</a> and <a href="http://apigen.org/">ApiGen</a>.
</p>
<p>
You can find out more about the PHP docblock standards from <a href="http://pear.php.net/manual/en/standards.sample.php">this site</a>.
</p>]]></description>
      <pubDate>Mon, 28 Jan 2013 09:21:58 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: Tricorder: A Testing Helper for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18036</guid>
      <link>http://www.phpdeveloper.org/news/18036</link>
      <description><![CDATA[<p>
<i>Chris Hartjes</i>, a big proponent of testing in the PHP community, has a new post to his blog about <a href="http://www.littlehart.net/atthekeyboard/2012/05/31/tricorder-a-testing-helper-for-php/">a new testing tool</a> he's released to make it easier for you to know what needs testing - <a href="https://github.com/chartjes/php-tricorder/">Tricorder</a>.
</p>
<blockquote>
I've hacked together a little CLI script that I think will be of use to many people who are trying to answer the question "just what should I do to test this thing anyway?" as they learn how to write PHPUnit tests to go along with their code. [...] I've created something that I am calling <a href="https://github.com/chartjes/php-tricorder/">PHP-Tricorder</a>, a CLI utility that can be used in conjunction with phpdoc structure.xml files to make suggestions on testing scenarios. It's at a 0.1 release right now, so I anticipate it will grow and add more features as time goes on.
</blockquote>
<p>
The post includes an example of the output generated from the <a href="http://phpdoc.org/">phpdoc</a>'s XML output, recommending things like:
</p>
<ul>
<li>Mocking certain objects
<li>Testing for data types and contents
<li>Recommending testing ideas for private/protected methods
</ul>
<p>
You can grab (or contribute to!) the latest version of the tool <a href="https://github.com/chartjes/php-tricorder/">over on github</a>.
</p>]]></description>
      <pubDate>Fri, 01 Jun 2012 11:11:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Inject dependencies via PhpDoc]]></title>
      <guid>http://www.phpdeveloper.org/news/17796</guid>
      <link>http://www.phpdeveloper.org/news/17796</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a new post to his blog looking at <a href="http://gonzalo123.wordpress.com/2012/04/09/inject-dependencies-via-phpdoc/">a method for injecting dependencies</a> into your application's code based on comments in the PHPDocumentor-formatted comments of your methods.
</p>
<blockquote>
Last month I attended to <a href="http://www.codemotion.es/">Codemotion</a> conference. I was listening to a talk about Java and I saw the "@inject" decorator. I must admit I switched off my mind from the conference and I started to take notes in my notebook. The idea is to implement something similar in PHP. It's a pity we don't have real decorators in PHP. I really <a href="http://gonzalo123.wordpress.com/2009/12/09/things-i-miss-in-php-function-decorators/">miss</a> them. We need to use <a href="http://gonzalo123.wordpress.com/2011/02/01/function-decorators-in-php-with-phpdoc-and-annotations/">PhpDoc</a>. It's not the same than real decorators in other programming languages. That's my prototype. Let's go.
</blockquote>
<p>
All of the code you'll need to recreate his solution is included - a sample "User" class that needs a valid PDO object in a private "db" property, a "DocInject" class that parses the comments and, using a new feature of PHP 5.4 (traits), injects the needed functionality into the "User" class and creates/assigns the object.
</p>
<p>
You can see just the full code in <a href="https://gist.github.com/2343376">these</a> <a href="https://gist.github.com/2343390">two</a> gists on Github.
</p>]]></description>
      <pubDate>Tue, 10 Apr 2012 10:23:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: phpDocumentor Merges with DocBlox for phpDocumentor 2!]]></title>
      <guid>http://www.phpdeveloper.org/news/17686</guid>
      <link>http://www.phpdeveloper.org/news/17686</link>
      <description><![CDATA[<p>
As is mentioned in <a href="http://www.docblox-project.org/2012/03/docblox-is-unmasked-it-is-really-phpdocumentor-2/">this new post</a> to the DocBlox blog, there's been a major development between it and the phpDocumentor documentation generation tool - phpDocumentor 2 will be released soon, merging DocBlock and phpDocumentor into one tool!
</p>
<blockquote>
Announcing phpDocumentor 2 - the merging of the old (phpDocumentor) and the new (DocBlox). With the first alpha release of phpDocumentor (2.0.0a1), the new "Responsive" default template sports a new page layout, along with the useful layout improvements that the original DocBlox templates provided (which remain available) over the old phpDocumentor templates (which will retire with old phpDocumentor). Explore this new template at <a href="http://demo.phpdoc.org/Responsive/index.html.">http://demo.phpdoc.org/Responsive/index.html</a>.
</blockquote>
<p>
Users of the current phpDocumentor software (version 1.x) will need to upgrade their documentation and installations. If you'd like more information about the transition or just keep up with the latest on this exciting advancement, check out #phpdocumentor on Freenode IRC or follow <a href="http://twitter.com/phpdocumentor">@phpdocumentor</a> on Twitter.
</p>]]></description>
      <pubDate>Fri, 16 Mar 2012 07:58:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Introduction to PhpDoc]]></title>
      <guid>http://www.phpdeveloper.org/news/17370</guid>
      <link>http://www.phpdeveloper.org/news/17370</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new post from <i>Moshe Teutsch</i> about <a href="http://phpmaster.com/introduction-to-phpdoc/">working with docblock comments</a> in PHP scripts and how to use the <a href="http://phpdoc.org">phpDocumentor</a> tool to generate the documentation from them.
</p>
<blockquote>
If you've ever tried to read code written by someone other than yourself (who hasn't?), you know it can be a daunting task. [...] PhpDoc, short for PhpDocumentor, is a powerful tool that allows you to easily document your code via specially formatted comments. [...] By using PhpDoc, you can make it easy for others (and yourself) to understand your code - weeks, months, and even years after you've written it.
</blockquote>
<p>
He introduces the concept of "docblocks" and includes several examples of how to comment things like packages, files, classes and functions/methods. Finally, he wraps up the post with an example of using the "phpdoc" command to run phpDocumentor and build the docs. In the comments, another tool is also suggested - <a href="http://docblox-project.org/">DocBlox</a>, a project that still parses the same docbloc syntax but does it in a much more memory efficient way (and is an actively maintained project).
</p>]]></description>
      <pubDate>Tue, 10 Jan 2012 10:07:26 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Tales of a Coder: DocBlox - Pain Free Documentation]]></title>
      <guid>http://www.phpdeveloper.org/news/17195</guid>
      <link>http://www.phpdeveloper.org/news/17195</link>
      <description><![CDATA[<p>
On the Tales of a Coder blog there's a <a href="http://codertales.wordpress.com/2011/11/30/docblox-pain-free-documentation/">recent post about DocBlox</a>, an alternative to the usual <a href="http://www.phpdoc.org/">phpDocumentor</a> for generating automatic documentation, and how it made it "pain free" for her current project.
</p>
<blockquote>
Want to generate documentation for your PHP project, but keep putting it off? Can't be bothered wading thigh deep in documentation, screaming WHY WON'T IT WORK as you try to set it up? Look no further. DocBlox is pain free and you'll be up and running, literally in a few minutes.
</blockquote>
<p>
She includes a guide to getting the <a href="http://www.docblox-project.org/">latest DocBlox installed</a> and configured to work with your project. The configuration is a straight-forward XML file, so changing the settings to match your needs is easy (more on the config <a href="http://docs.docblox-project.org/Configuration.html">here</a>). Once this is configured, building your documentation is one command away. For more details on DocBlox, check out <a href="http://www.docblox-project.org/">the project's website</a>.
</p>]]></description>
      <pubDate>Thu, 01 Dec 2011 09:56:27 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Michelangelo van Dam's Blog: Quality Assurance on PHP projects - PHPDocumentor feedback]]></title>
      <guid>http://www.phpdeveloper.org/news/16686</guid>
      <link>http://www.phpdeveloper.org/news/16686</link>
      <description><![CDATA[<p>
As a follow up to his <a href="http://phpdeveloper.org/news/16638">previous post</a> about using DocBlock commenting and <a href="http://www.phpdoc.org/">phpDocumentor</a> for automatic project documentation generation, <i>Michelangelo van Dam</i> has posted <a href="http://www.dragonbe.com/2011/08/quality-assurance-on-php-projects.html">a deeper look at DocBlox</a>, one of his previously mentioned alternatives.
</p>
<blockquote>
First of all, thank you all for the enormous feedback I got on my latest article on documentation of code. I got a lot of comments on the usage of <a href="http://www.phpdoc.org/">PHPDocumentor</a>. [...] I have to agree that [there are reasons] valid enough to step away from <a href="http://www.phpdoc.org/">PHPDocumentor</a> as a tool for documentation purposes and look for a better alternative. So I've investigated one tool most people have commented on or tweet-ed/facebook-ed/g+-ed on: <a href="http://www.docblox-project.org/">DocBlox</a>.
</blockquote>
<p>
He touches on the installation of the tool and mentions <a href="http://weierophinney.net/matthew/archives/265-Using-DocBlox.html">this tutorial</a> from <i>Matthew Weier O'Phinney</i> that guided him through the setup and use of DocBlox. He rand a few tests comparing phpDocumentor and DocBlox for the documentation generate and DocBlox came out <a href="http://2.bp.blogspot.com/--WIuSHOm8Mk/Tj7zto62KlI/AAAAAAAACwA/RWlyOg93XiU/s1600/Running+DocBlox.png">on</a> <a href="http://2.bp.blogspot.com/-hfEjzswrpD0/Tj7zuOswYkI/AAAAAAAACwE/FY8GLzZd-1o/s1600/Running+PHPDocumentor.png">top</a> when it came to runtime (and memory usage).
</p>]]></description>
      <pubDate>Mon, 08 Aug 2011 11:42:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michelangelo van Dam's Blog: Quality Assurance on PHP projects - PHPDocumentor]]></title>
      <guid>http://www.phpdeveloper.org/news/16638</guid>
      <link>http://www.phpdeveloper.org/news/16638</link>
      <description><![CDATA[<p>
<i>Michelangelo van Dam</i> has posted the latest in his "quality assurance in PHP projects" series today with a look at something that can make your life and documentation easier - <a href="http://www.dragonbe.com/2011/07/quality-assurance-on-php-projects_26.html">PHPDocumentor</a>.
</p>
<blockquote>
Unfortunately I've come across too many lines of code that were just lines of code, no comments or annotations provided. So, in best cases I could guess the types and parameters, but in many it was too obfuscated. I already talked about usage of a code sniffer like PHP_CodeSniffer in my <a href="http://www.dragonbe.com/2011/07/quality-assurance-on-php-projects_17.html">previous post</a> where you can validate the usage of comments in the code. But forcing developers (using a pre-commit checker) into writing documentation with their code is not really a good thing.
</blockquote>
<p>
He suggests using something like <a href="http://www.phpdoc.org/">PHPDocumetor</a> (there's other PHPDoc parsers including <a href="http://www.docblox-project.org/">DocBlox</a> and <a href="http://www.stack.nl/~dimitri/doxygen/">Doxygen</a> out there) to automatically generate documentation for your code based on its comments, giving your developers easier web-based access to the contents. He includes some sample docblocks for a class/method and gives an example command line call to build docs based on a project. <a href="http://www.youtube.com/watch?v=nPhyATNhnr">A screencast</a> and <a href="http://2.bp.blogspot.com/-dxQeU_Ri27c/Ti8rrVWxAeI/AAAAAAAACv0/JpzPIATbdCI/s1600/Api_Documentation.png">screenshot of the generated site</a> shows the results of the run.
</p>]]></description>
      <pubDate>Wed, 27 Jul 2011 08:51:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Liip Blog: PHPDoc Compilers and the @inheritdoc]]></title>
      <guid>http://www.phpdeveloper.org/news/16632</guid>
      <link>http://www.phpdeveloper.org/news/16632</link>
      <description><![CDATA[<p>
On the Liip blog there's <a href="http://blog.liip.ch/archive/2011/07/26/phpdoc-compilers-and-inheritdoc.html">a new post</a> that compares some of the popular PHPDocumentor-formatted comments parsers. They're looking specifically at the support for interfaces, not just the usual classes and methods.
</p>
<blockquote>
The interfaces define the standard and are extensively documented. The implementation was built by copying the interfaces and implementing the methods. Now we have the documentation comments duplicated, which is a pain to maintain if we clarify or change anything in the interfaces documentation. [...] In PHP, there is a couple of doc compilers. While they basically all follow the same syntax as Java uses, none of them gets everything right unfortunately. 
</blockquote>
<p>
The four covered are <a href="http://peej.github.com/phpdoctor/">PhpDoctor</a>, <a href="http://www.docblox-project.org/">DocBlox</a>, <a href="http://www.phpdoc.org/">PHPDoc</a> and <a href="http://www.stack.nl/~dimitri/doxygen/">Doxygen</a>. They look at things like namespace support, the inheritance information they generate and if it correctly uses the "@inheritDoc" tagging functionality.
</p>]]></description>
      <pubDate>Tue, 26 Jul 2011 09:29:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Koopmanschap's Blog: API documentation in Jenkins with DocBlox]]></title>
      <guid>http://www.phpdeveloper.org/news/16281</guid>
      <link>http://www.phpdeveloper.org/news/16281</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Stefan Koopmanschap</i> shows you how to <a href="http://www.leftontheweb.com/message/API_documentation_in_Jenkins_with_DocBlox">get DocBlox installed</a> for your documentation-generation needs as an alternative to <a href="http://www.phpdoc.org/">phpDocumentor</a>.
</p>
<blockquote>
People using PHP that want API documentation usually automatically think of <a href="http://www.phpdoc.org/">phpDocumentor</a>, which used to be the de facto standard for generating API documentation from your PHP projects. However, the project has been dormant for a long time now and definitely does not support new PHP features such as namespaces, so it was really time to look for an alternative. In this blogpost, I'll show you how I set up my Jenkins CI to use DocBlox, one of the new API documentation generators currently available.
</blockquote>
<p>
The <a href="http://docblox-project.org/">DocBlox project</a> is in active development and supports additional things in top of the current feature set phpDocumentor includes. <i>Stefan</i> gives you the exact XML you'll need to include in your Jenkins build file (and the phpDocumentor line it will likely replace) that builds out the documentation to a given path. He's given an example <a href="https://github.com/skoop/phpOpenNOS/blob/master/build.xml">of his full build file</a> to give you some context too.
</p>]]></description>
      <pubDate>Mon, 02 May 2011 11:26:40 -0500</pubDate>
    </item>
  </channel>
</rss>
