News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Pádraic Brady:
Security Oriented PSR Proposed to PHP-FIG
November 11, 2014 @ 11:56:42

Pádraic Brady has a new post to his site today talking about a security-oriented PSR that's being proposed to the PHP-FIG group (by Lukas Smith). The proposal suggests the creation of a security policy to be used by members of the PHP-FIG and a way to make sharing security issues more standardized.

Lukas Kahwe Smith recently brought forward an idea to PHP-FIG with two broad objectives for a new PSR: To write a security policy that could be adopted by members; and proposal to make sharing security vulnerabilities more common and standardised. He has invited interested people to express their interest in joining a separate mailing list to discuss the details: https://groups.google.com/forum/#!topic/php-fig/45AIj5bPHJ4. Larry Garfield of Drupal and Korvan Szanto of concrete5 CMS have offered to sponsor the proposal.

He talks some about security policies in general - what they are, why they're a good idea and what Lukas is proposing for PHP projects. He also briefly covers the publishing of vulnerability data, the different options for publishing them and how the standardization of it could be integrated with current tools (Composer anyone)?

0 comments voice your opinion now!
phpfig security standard reporting proposal discussion

Link: http://blog.astrumfutura.com/2014/11/security-oriented-psr-proposed-to-php-fig/

Michael Dowling:
Managing Changelogs With Chag
October 27, 2014 @ 10:24:17

Michael Dowling has a new post today with a new tool he's worked up that aims to make creating Changelogs simpler, building on the effort started by keepachangelog.com. A Changelog is a human-readable listing of changes between versions, ideally generated but usually manually created.

Open source projects often include some kind of changelog file that helps consumers of the project know the important changes that have been made between versions. The format and filename of a changelog typically varies from project to project; however, there's some promising news…http://keepachangelog.com hopes to standardize how open source projects represent changelog files. I've recently begun modifying the changelog files of all of my projects to conform to this new changelog standard.

He then gets into the tool he's created, chag, and how to aims to help make this Changelog standardization even easier. He walks you through the installation and options it provides for extracting current contents, listing versions, getting the latest versions and updating the contents. There's also an option to tag the version with a Git tag and uses the entry data as the annotation. He then talks about the release process with two different flows: the one GitHub itself includes (GitHub Releases) and the other configured through Travis CI.

0 comments voice your opinion now!
changelog automate chag tool keepachangelog standard

Link: http://mtdowling.com/blog/2014/10/26/managing-changelogs-with-chag/

Master Zend Framework:
Using the ClassMap Autoloader for Better Performance
June 19, 2014 @ 11:18:29

Matthew Setter has a new post to his Master Zend Framework site today with a recommendation on how you can use a classmap in your autoloader to reduce the time it takes "searching" for the files it needs.

Zend Framework 2′s been critiqued many times as being slow, at least slower than some of the other leading PHP frameworks. And to be fair, sometimes it's true. But it doesn't need to be and there are simple things you can do to improve performance of your applications. So this post will be the first in a multi-part series looking at ways in which you can improve the performance of your Zend Framework 2 application, with only a minimum of effort. Today, we're looking at the 2 autoloaders which are available in Zend Framework 2; these being the StandardAutoloader and ClassMapAutoloader.

He briefly introduces the concept of autoloaders and the PSR-0 standard that helped to bring a more unified method for their handling. He then gets into examples of using each of the two autoloader types. The Standard version (a fallback if nothing else is set up) resolves things based on a file path and locating classes in the right namespaces. The ClassMap autoloader does this mapping ahead of time and matches a path to a namespace+class. He includes code snippets showing how to set each of them up and a few statistics (using Apache's ab tool) of the difference in performance.

0 comments voice your opinion now!
zendframework2 tutorial autoloader classmap standard performance

Link: http://www.masterzendframework.com/performance-2/classmap-autoloader

Loosely Coupled Podcast:
Episode 2 My Code Is Perfect
April 16, 2014 @ 13:59:40

The Loosely Coupled podcast (with PHP community member hosts Jeff Carouth and Matt Frost) has released their latest episode, Episode #2: My Code is Perfect.

Writing clean code isn't something you pick up overnight, nor is it a brand new topic. In this episode Jeff and Matt discuss the characteristics and mechanics of creating clean code and how to approach your project from a clean code perspective. [...] In this episode, Jeff and Matt talk about code quality and beautiful code. Beautiful code follows a standard. If you don't have one, find one and adopt it.

There's some great notes in the post to accompany the recording with other suggestions, resources and links to other sources that can help you write cleaner, better code. You can listen to this latest episode either through the in-page player or by downloading the mp3 directly. You can also subscribe to their feed to get the latest episodes as they're released.

0 comments voice your opinion now!
looselycoupled podcast ep2 code perfect standard cleancode

Link: http://looselycoupled.info/blog/2014/04/14/episode-2-my-code-is-perfect/

Phil Sturgeon:
PHP-FIG Autoloaders, Amendments and The "15th Standard"
February 14, 2014 @ 09:04:47

Phil Sturgeon has a new post today looking at PHP-FIG and upcoming proposals the group currently has in progress. It also shares some of the problems with some of the current standards (including some amendments and replacements that need to happen).

I've managed to get myself involved in a lot of projects in and around the PHP community because I like to offer my advice, experience and time to trying to make things better. Recently, I've been putting in lots of time for bits around the PHP-FIG. Like it or not, tabs or spaces, PSR-2 or no, the PHP-FIG has had a huge impact on the PHP community and it's going to continue to do so. We have more PSR's in the works now that at any point before, and they're awesome ones.

He starts with a brief look at the next PSRs coming down the line: PSR-5 for PHPDocumentor standards, PSR-6 for a caching interface and PSR-7 with a standardized HTTP interface structure. He then gets into the problems around some of the current standards including the differences in autloading (PSR-0 vs PSR-4), the amendment process and a suggestion that PSR-2 (the coding standard) needs to be replaced.

0 comments voice your opinion now!
phpfig autoloader amendment psr5 psr6 psr7 psr2 standard

Link: http://philsturgeon.co.uk/blog/2014/02/phpfig-autoloaders-amendments-and-the-15th-standard

Pádraic Brady:
Coding Standards Humans Are Not Computers
February 11, 2014 @ 10:26:06

In his latest post Pádraic Brady shares some of his thoughts around coding standards and the existence of tools to be sure the code is exactly formatted correctly.

The problem with coding standards is not the notion of following conventions to ensure all programmer can quickly read and understand code (and other good stuff), but that someone created a tool to actually check compliance: PHP_CodeSniffer. This isn't a complaint about the operation of phpcs, but to complain about the mere fact of its existence. [...] Using the cover of such automated tools, we can make judgement calls about code quality, integrate style checks into Continuous Integration scoring schemes, complain about pull requests and patches, and generally impose a time penalty on writing code. There is a point at which common sense morphs into sheer nitpicking, and an automated tool is the perfect nitpicker.

In his opinion, coding standards should be "invisible and flexible" as well as easy to learn so the developers could learn and follow it quickly. He looks at these thoughts applied to the PSR standards and how adhering to them could quickly turn into something much more time consuming than it should. In his opinion a good coding standard is one that "limits the rules, eradicates ambiguity, formulates multiple use cases and avoids trivialities".

0 comments voice your opinion now!
coding standard psr phpcs codesniffer opinion

Link: http://blog.astrumfutura.com/2014/02/coding-standards-humans-are-not-computers/

Phil Sturgeon:
Composer now supports PSR-4
January 06, 2014 @ 09:59:36

As Phil Sturgeon notes in a recent post to his site, the Composer, the popular PHP package management tool, now supports the PSR-4 autoloading standard as defined by the PHP-FIG.

PSR-4 was voted in as an "accepted" PSR by the FIG in December. It took a little while to get done and went through a series of painful rewrites but when we have in the end is a document that reflects what this truly is: an improvement on PSR-0.

Today Jordi Boggiano merged a pull request by Andreas Hennings into master branch of Composer that contained support for PSR-4. Andreas was a massive help to the FIG while we were trying to shake the issues out of PSR-4 during Draft and Review stages, so he really outdone himself by providing the code too.

Phil makes a few suggestions about moving to PSR-4 including: not moving immediately, making a "psr4" branch to test it out and points to an example of how to do it. More information on PSR-4 and Composer can be found in the official documentation.

0 comments voice your opinion now!
composer psr4 autoload standard phpfig support

Link: http://philsturgeon.co.uk/blog/2014/01/composer-now-supports-psr4

The Nerdery:
Is my code compatible with PHP 5.4 or 5.5?
November 06, 2013 @ 11:15:40

On The Nerdery's blog today there's a new post that shows you a way to help test your code for PHP 5.4 and 5.5 - via PHP_CodeSniffer - as well as mentioning some of the changes that came with these versions.

Do you want to know if your code is compatible with that latest version of PHP? Do you need to upgrade your existing PHP website to a newer version of PHP? Do you want to see if your legacy PHP code is using any features that have been removed or deprecated in later versions of PHP? [...] ou need to migrate your existing code to ensure nothing will break when the upgrade occurs. How can you accomplish that?

They start with the list of differences (and backward incompatible changes) in the newer versions and point to the migration pages for each. Then they get into the use of PHP_CodeSniffer and some additional rules provided by Win Godden for checking the compatibility. With these added in, you can call the "phpcs" checking tool with the "PHPCompatibility" standard and check out the results. An example of what you might see on an older application is included in the post.

0 comments voice your opinion now!
code compatible update versions phpcodesniffer standard phpcompatibility

Link: http://blog.nerdery.com/2013/11/code-compatible-php-5-4-5-5/

Qandidate Blog:
Running symfony standard edition on HHVM
October 23, 2013 @ 12:25:34

On the Qandidate.com blog they have a new post (the second in a series, actually) about getting a Symfony application running on HHVM, the virtual machine version of the HipHop engine originally developed by Facebook. In this second post they show how to install and configure Symfony in a newly installed HHVM instance.

In part one of this series we talked about "Getting started with HHVM" by getting a compiled version of HHVM running in a vagrant box. In this part we'll configure the HHVM webserver to run the symfony standard edition.

They include full instructions for getting the full Standard edition of Symfony, installing Composer and configuring the HHVM server to correctly point to the application's document root. There's also virtual host and static file configurations included too. There's a few changes that need to be made on the Symfony side as well around session storage and timezones. When the server is started up and all goes well, the default Symfony page should come up when you visit the right address.

0 comments voice your opinion now!
symfony standard hhvm configuration setup tutorial

Link: http://labs.qandidate.com/blog/2013/10/21/running-symfony-standard-on-hhvm/

Reddit.com:
PSR-6 Caching Interface and PSR-5 PHPDoc enter Draft status
August 28, 2013 @ 15:30:29

As is mentioned in this Reddit post, two new PSRs have officially entered "Draft" status - PSR-5 for PHPDocumentor standards and PSR-6 related to caching implementations.

PSR-4 got to draft status a week ago and the other day it went into Review status. I pushed it to Review quickly as its already been around for several months (before this new workflow existed) so there didn't seem like much point in waiting. In less than two weeks we can put that in for an acceptance vote and we will have a new autoloader! Excellent. More good news from the FIG is that PSR-5 and PSR-6 are officially coming onto the scene, both now in Draft status too!

PSR-5, the PHPDoc standard, is more of an inclusion (and update) of most of the current standards people use when writing their PHPDoc comments, just more formalized by the PHP-FIG. PSR-6 is newer and is more akin to the logging PSR, defining the basic interface for an interchangeable caching layer. You can read more about each of the proposals in the mailing list: PSR-5: PHPDoc and PSR-6: caching.

0 comments voice your opinion now!
phpfig psr5 psr6 caching phpdocumentor phpdoc standard interface

Link: http://www.reddit.com/r/PHP/comments/1la27y/psr5_caching_interface_and_psr6_phpdoc_enter/


Community Events





Don't see your event here?
Let us know!


introduction symfony voicesoftheelephpant laravel release podcast conference series framework opinion interview language community security version list artisanfiles tool composer library

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework