<?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>Sat, 18 May 2013 02:29:04 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[P&aacute;draic Brady: Publishing Security Disclosures In Consumable Formats]]></title>
      <guid>http://www.phpdeveloper.org/news/19592</guid>
      <link>http://www.phpdeveloper.org/news/19592</link>
      <description><![CDATA[<p>
<i>P&aacute;draic Brady</i> has a new post today proposing that what the PHP ecosystem needs is a way to <a href="http://blog.astrumfutura.com/2013/05/publishing-security-disclosures-in-consumable-formats-for-simpler-aggregation-and-security-checking/">better publish security disclosures</a> in a format that's easy to parse and deal with.
</p>
<blockquote>
This is a branch off from a separate discussion on the PHP-FIG <a href="https://groups.google.com/forum/?fromgroups=#!forum/php-fig">mailing list</a> about other ways the Framework Interoperability Group can encourage and foster wider interoperability among its member projects (and by extension, the whole PHP community). I'll start by noting two interesting developments in recent months and one long standing best practice.
</blockquote>
<p>
The two "interesting developments" he mentions are the relatively recently released <a href="https://security.sensiolabs.org/">SensioLabs Security Checker</a> that uses you Composer file to find security issues and the new entry in the latest version of the OWASP Top 10 list for "<a href="https://www.owasp.org/index.php/Top_10_2013-A9">Using Components with Known Vulnerabilities</a>". The best practice he talks about is more around the timely/responsible disclosure of vulnerabilities and how some kind of decentralized tracking of these issues that puts the responsibility back on the developers of the tool and not on one tracking resource.
</p>
Link: http://blog.astrumfutura.com/2013/05/publishing-security-disclosures-in-consumable-formats-for-simpler-aggregation-and-security-checking]]></description>
      <pubDate>Thu, 16 May 2013 09:03:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPClasses.org: 26 Ways to Show that PHP Can Be Better Than PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19345</guid>
      <link>http://www.phpdeveloper.org/news/19345</link>
      <description><![CDATA[<p>
In a new blog post on PHPClasses.org today <i>Manuel Lemos</i> has gathered together some of the things that PHP doesn't have (yet). Most of them are things that developers have expressed a desire for in the core and either have yet to make it into a <a href="http://wiki.php.net/rfc">RFC</a> or are still just being implemented in "userland" code.
</p>
<blockquote>
The PHP development process is still a bit frustrating. Many developers hoped that PHP had certain features but those are still missing due to several reasons. One way to see those features happen is to write code to implement the features and then submit the code to the PHP core. However that is not a guaranteed process. Even if you provide the necessary code, other developers may object to the addition of those features and the effort is wasted.
</blockquote>
<p>
Among the things he lists as features that are desired but not implemented yet are things like:
</p>
<ul>
<li>Aspect oriented programming
<li>Annotations
<li>Class generics
<li>Introspection of private variables and functions
<li>Named parameters
</ul>
<p>
There's a summary of each of the features mentioned and in some cases links to RFCs that presented the same ideas. If you're interested in presenting your own ideas to the PHP project for inclusion, you can "demystify" the RFC process by checking out <a href="https://blogs.oracle.com/opal/entry/the_mysterious_php_rfc_process">this post</a> from <i>Chris Jones</i> with lots of good suggestions and the flow of how the process (usually) works.
</p>]]></description>
      <pubDate>Thu, 21 Mar 2013 11:14:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stuart Herbert: Personal Thoughts On The PSR-3 Log Proposal]]></title>
      <guid>http://www.phpdeveloper.org/news/18971</guid>
      <link>http://www.phpdeveloper.org/news/18971</link>
      <description><![CDATA[<p>
In his latest post, <i>Stuart Herbert</i> has <a href="http://blog.stuartherbert.com/php/2012/12/29/personal-thoughts-on-the-psr-3-log-proposal/">shared some thoughts</a> about the recently proposed PSR-3 proposal for a unified logging interface for PHP projects.
</p>
<blockquote>
PSR-3 is a proposed standard (<a href="https://groups.google.com/forum/?fromgroups=#!topic/php-fig/d0yPC7jWPAE">voting</a> has finished, it should appear as an accepted standard when the PSR folks recover from too much Christmas turkey) describing a common logging interface for PHP frameworks. It's based on a small subsection of <a href="http://tools.ietf.org/html/rfc5424">RFC 5424</a>, which describes the Syslog standard, which is a very sensible choice. Sysadmins think in terms of Syslog levels, and they utterly hate dealing with loggers that don't map cleanly onto Syslog.
</blockquote>
<p>
He briefly introduces the PSR and the format of the logger with some of the main methods it should implement and what they do. He talk gets into some of his critiques about the proposal, namely the method naming, the exception handling parameter and the proposed LogLevel constants.
</p>]]></description>
      <pubDate>Mon, 31 Dec 2012 10:46:13 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ben Ramsey: Writing an Effective Talk Proposal]]></title>
      <guid>http://www.phpdeveloper.org/news/18831</guid>
      <link>http://www.phpdeveloper.org/news/18831</link>
      <description><![CDATA[<p>
if you've ever considered contributing to a PHP (or any other technology conference) but weren't sure about how to even get started writing up a proposal for a session, you should check out <a href="http://benramsey.com/blog/2012/11/writing-an-effective-talk-proposal/">this recent post</a> from <i>Ben Ramsey</i> with a good guide (and some advice experienced speakers could use too).
</p>
<blockquote>
Earlier today, I was asked "Any tips on how to write a proposal for a major conf?" I've never shared tips on this, and since the calls for proposals for <a href="http://sunshinephp.com/">Sunshine PHP</a> and <a href="http://www.midwestphp.com/">Midwest PHP</a> both end tomorrow, I thought it would be a good idea to share my approach to writing conference proposals. Remember those <a href="http://en.wikipedia.org/wiki/Five_paragraph_essay">standard, five-paragraph essays</a> you used to write in high school? Remember how you thought they sucked and wouldn't provide any practical benefit to your life? Well, it turns out they do have some redeeming qualities.
</blockquote>
<p>
He suggests that this "five paragraph essay" format helps you not only come up with a more fleshed out, full idea but also can provide you with the abstract to submit to the conference (possibly the first paragraph). He mentions the need for a "hook" and finishing off with an opinion that's the basis of the talk. He also has a reminder of a few things - don't talk down, don't use negative language and try not to use absolutes.
</p>]]></description>
      <pubDate>Mon, 03 Dec 2012 10:25:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[P&aacute;draic Brady: PHP Escaper RFC: Consistent Escaping Functionality For Killing XSS]]></title>
      <guid>http://www.phpdeveloper.org/news/18496</guid>
      <link>http://www.phpdeveloper.org/news/18496</link>
      <description><![CDATA[<p>
There's been a lot of chatter about a recent RFC from <i>P&aacute;draic Brady</i> on the php.internals maling list - his proposal to add native escaping to the PHP core. He <a href="http://blog.astrumfutura.com/2012/09/php-esaper-rfc-consistent-escaping-functionality-for-killing-xss/">shares some of his own thoughts</a> about the proposal in a new post to his site.
</p>
<blockquote>
A short time ago today, I <a href="https://wiki.php.net/rfc/escaper">submitted a PHP RFC</a> for discussion which proposes adding an SPL Escaper class and, quite possibly, a related set of functions dedicated to escaping data for output to HTML/XML to PHP: <a href="https://wiki.php.net/rfc/escaper">https://wiki.php.net/rfc/escaper</a>. The RFC itself should be a good read if you want to understand why I'm proposing this but the basics are quite simple. Cross-Site Scripting (XSS) is one of the two most common security vulnerabilities in web applications - the other being SQL Injection. Despite this, PHP's offering of escaping functions is extremely limited. 
</blockquote>
<p>
He talks about what problems the proposed solution solves and how it could help protect PHP programmers more effectively than the more complicated methods they have to go through now. If you're interested in reading the conversations so far, you can <a href="http://news.php.net/php.internals/63049">start here</a> and walk through the messages.
</p>]]></description>
      <pubDate>Wed, 19 Sep 2012 13:02:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Scott Mattocks: LUCID Development]]></title>
      <guid>http://www.phpdeveloper.org/news/18467</guid>
      <link>http://www.phpdeveloper.org/news/18467</link>
      <description><![CDATA[<p>
<i>Scott Mattocks</i> has <a href="http://crisscott.com/2012/09/11/lucid-development/">a new post</a> to his site today about a set of development principles he's proposing called "LUCID" (similar in idea to <a href="http://en.wikipedia.org/wiki/SOLID_(object-oriented_design)">SOLID</a>) - Logs, Unit Tested, Configurable, has Isolated features and is fully Documented.
</p>
<blockquote>
Building software with a clear set of use cases and requirements is a relatively straight forward process. Various design patterns exist to help you solve problems which others have come across already. You can use principles like SOLID to help separate your classes and simplify your code. [...] Using a set of guidelines like SOLID may make it easier to swap out a broken class for a new class, but they don't really help you identify the problem or fix any data corruption which may have occurred. Knowing you have a problem and being able to isolate and fix the problem is just as important, if not more so, than being able to rely on consistent interfaces from your factory method. That is why I am proposing an additional set of software development guidelines called "LUCID code."
</blockquote>
<p>
He defines it as "code with understands that bugs are unavoidable" and is able to give developers feedback through its own logging, tests and documentation. With correctly isolated code, development can be segmented and worked at the same time and make changing requirements and updating functionality simpler in the long run. 
</p>]]></description>
      <pubDate>Wed, 12 Sep 2012 08:14:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sherif Ramadan: Finally Getting finally In PHP?]]></title>
      <guid>http://www.phpdeveloper.org/news/18339</guid>
      <link>http://www.phpdeveloper.org/news/18339</link>
      <description><![CDATA[<p>
In <a href="http://sheriframadan.com/2012/08/finally-keyword-in-php/">this recent post</a> to his site <i>Sherif Ramadan</i> looks at a proposal that's currently under view (RFC) to <a href="https://wiki.php.net/rfc/finally">add the "finally" keyword</a> to PHP.
</p>
<blockquote>
It's quite possible that PHP may finally be getting the addition of the finally block in its try/catch block. [...]  It also solves a simple, but overlooked problem for the developer. With finally we offer the user-space code a chance to do any clean up work that may be necessary after a try block has terminated execution and with clear semantics.
</blockquote>
<p>
He includes a use case for this feature - an example showing exception handling on multiple levels and writing to log files when the cleanup of the exception is finished (without the potential for another method to trigger the exception itself). "Finally" allows you to take this logic out of the exception handling and put it at the end, removing the possibility of it triggering an exception for the wrong reason. There's a few other examples showing some other quirks with its usage - like calling <a href="http://php.net/die">die</a> will not make it end up in the "finally".
</p>]]></description>
      <pubDate>Thu, 09 Aug 2012 10:53:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anthony Ferrara: What Generators Can Do For You]]></title>
      <guid>http://www.phpdeveloper.org/news/18263</guid>
      <link>http://www.phpdeveloper.org/news/18263</link>
      <description><![CDATA[<p>
<i>Anthony Ferarra</i> has a new post looking at <a href="http://blog.ircmaxell.com/2012/07/what-generators-can-do-for-you.html">using generators in your code</a> (as <a href="https://wiki.php.net/rfc/generators>proposed here</a>). He introduces the idea behind them and shows both a simple and more complex example of their use.
</p>
<blockquote>
The concept of generators was <a href="https://wiki.php.net/rfc/generators">recently proposed</a> for addition in PHP's core (Possibly for 5.5.0). While I believe that this is a great tool, it appears that many PHP developers aren't familiar with the concept of generators. So I thought I would take a little time and explain some of how it works, and how it can be used to greatly simplify code.
</blockquote>
<p>
He explains the concept of "generators" as an easier way to implement iterators. In his example he shows how to refactor is file handling iterator to replace it with generator functionality. It uses a new keyword, "yield", to return a Generator instance that can then can be used much like the file iterator without the need for all of the code to create the iterator itself. His more complex example shows how to replace an ArrayObject instance by a little trick inside its "getIterator" method.
</p>]]></description>
      <pubDate>Tue, 24 Jul 2012 08:43:58 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anthony Ferrara's Blog: Open Standards - The Better Way]]></title>
      <guid>http://www.phpdeveloper.org/news/17999</guid>
      <link>http://www.phpdeveloper.org/news/17999</link>
      <description><![CDATA[<p>
In <a href="http://blog.ircmaxell.com/2012/05/open-standards-better-way.html">this new post</a> to his blog <i>Anthony Ferrara</i> responds to some of the recent news about PHP standards being up for voting (PSR-1 and PSR-2). He has an issue with how they were created, though, and notes that the current PSR process doesn't encourage open standards.
</p>
<blockquote>
There has been a lot of traction lately on the topic of the PSR "PHP Framework Interoperability Group". They are introducing two new proposed standards: PSR-1and PSR-2, both dealing with code formatting standards. [...] I have read both, and actually agree and think they are quite good. However, there's a deeper problem. Open Standards is something that the internet was built upon. From HTTP, E-Mail and HTML to ECMA Script (JavaScript), OAuth and JSON, open standards are everywhere. The problem with the entire PSR process is that it is not designed to produce open standards. 
</blockquote>
<p>
He describes an "open standard" and points to <a href="http://tools.ietf.org/html/rfc2026#section-6">this RFC</a> as an example of the open process they should result from. He talks about the importance of the process and how having more people reviewing and contributing their ideas could help find issues in the proposal. He issues a "call to the PSR team" to adopt this practice, allowing a more open flow to the ideas that are being proposed. 
</p>
<blockquote>
Note that I'm not asking to open the vote to anyone else. I'm not saying that standards should be approved by everyone in the community. There should still be a standards body that makes the final decision. But they should make that decision based on community input. They should actively look for and encourage open discussion prior to voting. 
</blockquote>]]></description>
      <pubDate>Thu, 24 May 2012 08:18:13 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Nikita Popov's Blog: Scalar type hinting is harder than you think]]></title>
      <guid>http://www.phpdeveloper.org/news/17638</guid>
      <link>http://www.phpdeveloper.org/news/17638</link>
      <description><![CDATA[<p>
In <a href="http://nikic.github.com/2012/03/06/Scalar-type-hinting-is-harder-than-you-think">this new post</a> to his blog <i>Nikita</i> talks about scalar type hinting and why it's harder than most people think to accomplish.
</p>
<blockquote>
One of the features originally planned for PHP 5.4 was scalar type hinting. But as you know, they weren't included in the release. Recently the topic has come up again on the mailing list and there has been a hell lot of discussion about it. Yesterday ircmaxell published a <a href="http://blog.ircmaxell.com/2012/03/parameter-type-casting-in-php.html">blog post about his particular proposals</a>. The reactions on <a href="http://www.reddit.com/r/PHP/comments/qiniv/parameter_type_casting_in_php/">reddit</a> were mixed. On one hand it is clear that people do really want scalar type hints, on the other hand they didn't seem to like that particular proposal.
</blockquote>
<p>
He gets into some of the details of some of the current proposals and their problems like the strict versus loosely-typed nature of PHP and type hinting that was included but not enforced. One he does like, however, is one based on casting - how the variable ends up being cast rather than the specific type it is when it comes into the function/method. This one still has its flaws, so he suggests another method - weak type hints but with stricter input validation (without casting). He also briefly mentions something called "box based type hinting" that would allow users to define their own hinting rules.
</p>
<p>
Don't worry - code examples (pseudo-code obviously) <a href="http://nikic.github.com/2012/03/06/Scalar-type-hinting-is-harder-than-you-think">are included</a> for each of these proposals to help you understand the differences.
</p>]]></description>
      <pubDate>Wed, 07 Mar 2012 10:03:47 -0600</pubDate>
    </item>
  </channel>
</rss>
