<?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>Thu, 23 May 2013 12:37:34 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Daniel Cousineau: Using Symfony Console From Scratch]]></title>
      <guid>http://www.phpdeveloper.org/news/19419</guid>
      <link>http://www.phpdeveloper.org/news/19419</link>
      <description><![CDATA[<p>
<i>Daniel Cousineau</i> has posted a guide to <a href="http://dcousineau.com/blog/2013/03/28/using-symfony-console-from-scratch/">using the Symfony Console component</a> as a part of your application. It introduces you to some of the basics of using the component and has plenty of sample code to get you started.
</p>
<blockquote>
CLI applications are extremely useful for many, if not most web projects. The Symfony framework even goes so far as to include an extensible CLI console used for everything from running cache cleanup/warmup tasks, to user account management. Many CLI scripts for web projects consist of just a static .php file which works fine but grow unweildy over time. Thankfully, the aforementioned Symfony Console component is released as a decoupled standalone that can be installed and setup easily and provide us with structure and organization (and some powerful features).
</blockquote>
<p>
He walks you through the installation of the component via Composer and includes the code to make a simple CLI script using it. He shows how to make new commands (like his "TestCommand") and how to attach it to the application. He talks about output and input handling with arguments and options. He also shows an integration with an existing application with a base command class that helps to set up and configure the command objects that inherit it.
</p>
Link: http://dcousineau.com/blog/2013/03/28/using-symfony-console-from-scratch/]]></description>
      <pubDate>Fri, 05 Apr 2013 12:46:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: The Wheel: Symfony Console]]></title>
      <guid>http://www.phpdeveloper.org/news/19307</guid>
      <link>http://www.phpdeveloper.org/news/19307</link>
      <description><![CDATA[<p>
In <a href="http://css.dzone.com/articles/wheel-symfony-console">this new post</a> to DZone.com, <i>Giorgio Sironi</i> kicks off a series that looks at reusable components in the PHP development world. In this first post of that series he looks at the <a href="http://symfony.com/doc/current/components/console/introduction.html">Symfony console component </a>.
</p>
<blockquote>
Symfony is one of the most popular open source PHP frameworks on the market. The Symfony Components, however, are loosely coupled projects that can be reused as a library outside of an application based on Symfony. The component this article explores is Console (symfony/console on Packagist and GitHub), dedicated to quickly build console applications.
</blockquote>
<p>
He goes on to talk about some of the "pros" of using the component (including built-in argument/input handing and multiple "commands") and some of the "cons" of is use (including its size and some of the built-in features you can't really work around).
</p>]]></description>
      <pubDate>Wed, 13 Mar 2013 11:22:31 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zumba Engineering Blog: Creating bash completion to your console application]]></title>
      <guid>http://www.phpdeveloper.org/news/18383</guid>
      <link>http://www.phpdeveloper.org/news/18383</link>
      <description><![CDATA[<p>
On the Zumba Engineering blog there's a new post showing you how to <a href="http://engineering.zumba.com/2012/08/20/creating-bash-completion/">implement bash shell "autocomplete"</a> with a special option for a second argument.
</p>
<blockquote>
This weekend I saw the <a href="https://github.com/AD7six/cakephp-completion">bash completion for CakePHP</a> from <a href="http://ad7six.com/">Andy Dawson</a> and had an idea to do the same for our service application, because we frequently forget the exactly job class or method name and add extra steps to verify these names before execute the job. I read his code, made some research and finally get our bash completion working fine.
</blockquote>
<p>
In his case he wanted to see what things a module in the application had to offer, so he implemented a "__check__" argument that looked at the third argument and used reflection to get the methods allowed for it. Also included in the post is the bash alias you'll need to set up to get it working (and where to put it to make it cooperate).
</p>]]></description>
      <pubDate>Tue, 21 Aug 2012 09:47:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[FuelPHP: Oil Migrations, Tasks and Console (Screencast)]]></title>
      <guid>http://www.phpdeveloper.org/news/16046</guid>
      <link>http://www.phpdeveloper.org/news/16046</link>
      <description><![CDATA[<p>
<i>Phil Sturgeon</i> has <a href="http://blip.tv/file/4885416">put together a screencast</a> showing off a few of the features of the <a href="http://fuelphp.com">Fuel PHP framework</a> like migrations, tasks and the console the Oil tool provides.
</p>
<blockquote>
In this video I'm going to be demonstrating migrations which I touched on in the last video but I felt I should go into them in more depth. Migrations [...] are essentially a way to stage changes for your database in a way that means the changes can be independent from the schema as a whole.
</blockquote>
<p>
He walks you through the creation of a migration with the help of the Oil command line tool. The generated classes include "up" and "down" methods for the creation and rollback of your changes. He shows the process to create a simple task and how to use the built-in console to interactively work with the framework. You can find out more about Fuel <a href="http://fuelphp.com/docs/">on the Fuel documentation section</a> of the project's site.
</p>]]></description>
      <pubDate>Tue, 15 Mar 2011 11:31:39 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sasa Stamenkovic's Blog: Building CLI Apps With Symfony Console Component]]></title>
      <guid>http://www.phpdeveloper.org/news/15662</guid>
      <link>http://www.phpdeveloper.org/news/15662</link>
      <description><![CDATA[<p>
<i>Sasa Stamenkovic</i> has submitted <a href="http://dev.umpirsky.com/building-cli-apps-with-symfony-console-component/">a new tutorial</a> he's written up about how to build CLI applications in Symfony with the help of its console component.
</p>
<blockquote>
When working with PHP, I usually use <a href="http://framework.zend.com/">Zend Framework</a> for my projects. It has nice code generation tool (<a href="http://framework.zend.com/manual/en/zend.tool.html">Zend_Tool</a>), MVC, forms, helpers and it's very flexible. But one aspect where Zend wasn't the best tool for the job is building CLI applications. [...] Symfony Console Component is still under development, and there is no good documentation yet. I managed to google out Fabien Potencier's <a href="http://www.slideshare.net/fabpot/symfony-components-3393116">slides</a> from ConFoo 2010 conference where he mentioned the component and showed one simple example. But still, most of the time working with the component, I find myself reading its source code.
</blockquote>
<p>
He creates a simple console calculator application that takes in two numbers and calculates the sum of the two numbers. He includes an addition to the "--help" menu. Complete code is included to build the CLI interface and to create the class it uses to make the calculation. He shows how to add new commands and a bit on how to test your new command. Complete source code is available on github.
</p>]]></description>
      <pubDate>Fri, 31 Dec 2010 00:33:58 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Liip Blog: Using the Symfony2 console]]></title>
      <guid>http://www.phpdeveloper.org/news/15619</guid>
      <link>http://www.phpdeveloper.org/news/15619</link>
      <description><![CDATA[<p>
In <a href="http://blog.liip.ch/archive/2010/12/21/using-the-symfony2-console.html">this recent post</a> from the Liip blog, they talk about using the console functionality that comes with the Symfony2 framework to run bundles <a href="http://docs.symfony-reloaded.org/quick_tour/the_architecture.html?highlight=console#the-command-line-interface">from the command line</a>.
</p>
<blockquote>
Seems at least some people had the same idea as I had, retrieving data from a feed via HTTP GET. So Symfony2 comes up with a nice little wrapper - the console. Unfortunately the documentation on the website only gives a very brief introduction to it Located in the app directory of your project it is ready to be called as soon your Symfony2 installation is ready to be used. Executing it on the command line without an argument it exposes its help page.
</blockquote>
<p>
He shows you how to get your bundle exposed to the console and a few steps you'll need to do to make it properly executable. He includes a simple "configure()" method you can use to set up a few other things like bundle name, description and arguments to be passed in.
</p>]]></description>
      <pubDate>Wed, 22 Dec 2010 12:02:54 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[ServerGrove.com: Creating console commands with Symfony2]]></title>
      <guid>http://www.phpdeveloper.org/news/15285</guid>
      <link>http://www.phpdeveloper.org/news/15285</link>
      <description><![CDATA[<p>
On the ServerGrove.com blog today there's <a href="http://blog.servergrove.com/2010/10/14/creating-console-commands-with-symfony2/">this new post</a> showing you how to create console commands with your <a href="http://symfony-reloaded.org/">Symfony2</a> codebase in addition to the normal websites you might have generated.
</p>
<blockquote>
<a href="http://symfony-reloaded.org/">Symfony 2</a> is mainly used to create web application, however, sometimes you need to extend your app and need a command line tool to help perform tasks around the application. With <a href="http://www.symfony-project.org/">symfony 1.4.x</a> these were called <a href="http://www.symfony-project.org/gentle-introduction/1_4/en/16-Application-Management-Tools#chapter_16_sub_custom_tasks">tasks</a> and it was possible to create a skeleton by using the symfony generate:task task.
</blockquote>
<p>
While there's not a tool for it, Symfony2 does offer something called "Commands" as a sort of replacement. A basic skeleton of one is included with the framework, there's just no auto-generation tool for them (yet). The basic one, TestCommand.php, shows you how to set up a command's name, arguments and some parameter mapping. <a href="http://blog.servergrove.com/2010/10/14/creating-console-commands-with-symfony2/">The post</a> includes this code example and how it looks when called from the command line.
</p>
]]></description>
      <pubDate>Fri, 15 Oct 2010 08:53:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jordi Boggiano's Blog: PHP Console in Your Browser]]></title>
      <guid>http://www.phpdeveloper.org/news/15183</guid>
      <link>http://www.phpdeveloper.org/news/15183</link>
      <description><![CDATA[<p>
<i>Jordi Boggiano</i> has <a href="http://seld.be/notes/php-console-in-your-browser">a new post today</a> looking at his PHP console script that works in your browser that sets up easily and works from your localhost web server - <a href="http://github.com/seldaek/php-console">php-console</a>.
</p>
<blockquote>
 Since I spend most of my days programming PHP I tend to need that a lot and a few years back I wrote a small script that would let me type php code in my browser and execute it. Nothing fancy, but quite useful. Over the years a few people got interest seeing me use it and asked for the sources, so instead of repackaging it every time, I thought I'd clean it up, polish a bit, add some features, and put it on github. 
</blockquote>
<p>
Setup is as simple as dropping the code somewhere in your local server's document root and offers a textarea for input and a expandable tree for the resulting output. It uses the <a href="http://krumo.sourceforge.net">Krumo</a> tool to create this modified output. You can see a <a href="http://seld.be/_misc/php-console.png">screenshot here</a>.
</p>]]></description>
      <pubDate>Fri, 24 Sep 2010 11:51:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Maggie Nelson's Blog: Beyond Error Logs]]></title>
      <guid>http://www.phpdeveloper.org/news/11602</guid>
      <link>http://www.phpdeveloper.org/news/11602</link>
      <description><![CDATA[<p>
In <a href="http://maggienelson.com/2008/12/beyond-error-logs/">a new post</a> to her blog <i>Maggie Nelson</i> points out the importance of error logs and a handy tool Zend Framework developers can use to make <a href="http://www.firephp.org/">FirePHP</a> even more useful.
</p>
<blockquote>
The error log is a standard development support tool. It will help you find problems with your application. When developing, I take extra care to make sure that the error log is clean - this includes warnings and notices as well. When your application gets deployed, you can then depend on the error logs to accurately report any issues. [...] On a recent project, my coworker <a href="http://codenaked.org/">Matt Purdon</a> wrote a pretty awesome debug console that leverages <a href="http://www.firephp.org/">FirePHP</a> support in Zend Framework to log a lot of information about what the application is doing directly to the <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug</a> console. 
</blockquote>
<p>
The <a href="http://codenaked.org/archives/12-Debugging-with-FirePHP.html#extended">end result</a> is a console that lets you track things like session variables, memcached information and queries executed in the request (with explain plans). You can see a <a href="http://codenaked.org/uploads/firebug.jpg">screenshot here</a>.
</p>]]></description>
      <pubDate>Fri, 19 Dec 2008 09:34:30 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Christoph Dorn's Blog: FirePHP and Zend Framework 1.6]]></title>
      <guid>http://www.phpdeveloper.org/news/10958</guid>
      <link>http://www.phpdeveloper.org/news/10958</link>
      <description><![CDATA[<p>
As mentioned on the <a href="http://devzone.zend.com/article/3821-Christoph-Dorn-writes-on-FirePHP-and-Zend-Framework-1.6">Zend Developer Zone</a>, there's a <a href="http://www.christophdorn.com/Blog/2008/09/02/firephp-and-zend-framework-16/">new tutorial</a> from <i>Christoph Dorn</i> about combining the Zend Framework with the <a href="http://www.firephp.org/">FirePHP</a> debugging tool that now comes included in the latest release (ZF 1.6).
</p>
<blockquote>
The long awaited day has arrived. <a href="http://framework.zend.com/">Zend Framework 1.6</a> just shipped and with it native support for <a href="http://www.firephp.org/">FirePHP</a>! This means that if you use Zend Framework (ZF) you can now log to your <a href="http://www.getfirebug.com/">Firebug</a> <a href="http://getfirebug.com/logging.html">Console</a> via FirePHP without needing to download any other PHP files such as the <a href="http://www.firephp.org/Wiki/Libraries/FirePHPCore">FirePHPCore</a> library.
</blockquote>
<p>
The two new components - <a href="http://framework.zend.com/manual/en/zend.log.writers.html#zend.log.writers.firebug">Zend_Log_Writer_Firebug</a> and <a href="http://framework.zend.com/manual/en/zend.db.profiler.html#zend.db.profiler.profilers.firebug">Zend_Db_Profiler_Firebug</a> - are used in the debugging and <a href="http://www.christophdorn.com/Blog/2008/09/02/firephp-and-zend-framework-16/">his tutorial</a> shows you how to get started.
</p>]]></description>
      <pubDate>Thu, 04 Sep 2008 08:48:40 -0500</pubDate>
    </item>
  </channel>
</rss>
