News Feed
Jobs Feed
Sections




News Archive
feed this:

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

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

Phil Sturgeon:
PSR-2 v CodeSniffer PSR-2 A Success Story
October 16, 2013 @ 09:34:15

In a new post to his site Phil Sturgeon talks about the "success story" around the PSR-2 PHP-FIG standard and his work to get the PHP CodeSniffer checks to be more correct for it.

I've had static analysis tools running in Sublime Text for a long time, but for most of that time I have had CodeSniffer and it's PSR-2 rules disabled. I couldn't for the life of me remember why I had done that, until I turned it back on again. All of a sudden it started complaining about code that I had always considered to be perfectly compliant. It reminded me of multiple conversations I've had with others in the FIG and the community in general, about how CodeSniffer often enforces rules in the PSR-2 spec that do not exist, or were not what was meant when it was written. Two months ago I set off on a mission, to get CodeSniffer in line with what PSR-2 really is.

He gets into a bit of the backstory around the checks and the addition of "Errata" to add to the specs that have already been defined. The goal isn't to alter what's been defined, but to help clarify some issues (or close some loopholes) that might have come up. After polling the PHP-FIG mailing list about it - and it passing unanimously - the Errata was added and the CodeSniffer rules were updated to match (PHP_CodeSniffer 1.4.7).

If you're interested in other unclear places in the PSR-2 spec and want to discuss it, check out this gist and the conversation that goes with it.

0 comments voice your opinion now!
psr2 codesniffer rule clarity errata phpfig

Link: http://philsturgeon.co.uk/blog/2013/10/psr2-v-codesniffer-psr2

NetTuts.com:
PSR-Duh!
April 12, 2013 @ 10:46:26

On NetTuts.com today there's a post that talks about applying the PSR formatting to your application's code. If you haven't already read their introduction to the PSRs, it's highly suggested.

In a previous lesson here on Nettuts+, you learn about PSR; however, that article didn't detail the process of integrating that coding style into your projects. Let's fix that!

They briefly recap the main two PSRs (PSR-1 and PSR-2, but no mention of PSR-3 the logging interface) and show code examples of them being applied. They also point to the PHP_CodeSniffer tool that you can use to keep your code in the correct structure. Instructions are included to install it specifically for the Sublime Text 2 editor via package control. It's just a command-line tool, though, so it could be integrated with just about any other editor/IDE out there too.

0 comments voice your opinion now!
psr psr1 psr2 apply autoload formatting phpcodesniffer

Link: http://net.tutsplus.com/tutorials/tools-and-tips/psr-duh

Chris Hartjes:
Standards, Soapboxes, and Shamans
January 21, 2013 @ 13:16:47

In this latest post to his site Chris Hartjes shares some of his thoughts about the recently approved PSR-3 standard (for logging) and some of the reception that the other PSRs (PSR-0, 1 & 2) have gotten from the PHP community.

For those who pay attention to the workings of the PHP community you might have heard about the "PHP Standards Recommendations" that have been coming out of the PHP Framwork Interop Group. [...] More recently this group has been working on a standard for logging interfaces called PSR-3. I spoke about this on Twitter, and I will repeat it here: I think PHP programmers should get behind PSR-0 and efforts like PSR-3. I feel that PSR-1 and PSR-2 are solutions looking for a problem and seem, to me anyway, to me out of place with the solutions offered by PSR-0 and PSR-3.

He likens the PHP PSRs to the Python enhancement proposals (PEPs) and, more specifically, to the PEP-8 - their own version of "coding standards" that was highly championed by Guido van Rossum and put into wide practice.

Any programming language community that does not work as hard as possible to make it easier to integrate other's libraries of code together [by standardizing their formatting] is asking for irrelevancy.
0 comments voice your opinion now!
standards psr0 psr1 psr2 psr3 community feedback python pep


Project:
PHPHint.org - Online PHP Code Analysis
August 08, 2012 @ 10:18:59

Klaus Silveira has submitted a project he's come up with to help PHP developers detect problems in their code via a web-based application - PHPHint.org.

PHPHint is a community-driven, quick and easy to use, online tool that analyzes your PHP code and looks for potential errors, lack of best practices and code smell. It also allows you to clean your code automagically.

It was created to spread the work about the PSR standards and the PHP-FIG group, the importance of getting rid of code smell and applying to standards.

Since it is an open source project, you can help contribute if you'd like to see improvements to the service. It's great that it takes the relatively new PSR standards (PSR-1 & PSR-2) into account when analyzing the code too.

0 comments voice your opinion now!
phphintorg code analysis online psr1 psr2


Phil Sturgeon's Blog:
PHP Ecosystem Update
July 11, 2012 @ 09:25:28

In this new post Phil Sturgeon looks at two movements in the PHP community that are doing positive things for the language and the community as a whole - the Framework Interoperability Group (PHP-FIG) and the more recent "PHP The Right Way" initiative.

Don't worry guys, this isn't another PHP apologist or PHP hater blog. We've all had enough of those recently. This is a quick heads up on two projects that are doing what they can to make the PHP ecosystem a better place.

He talks a bit about some of the recent work that the PHP-FIG has done, the new standards that were approved by the group (PSR-1 & PSR-2) as well as the launch of a dedicated website for the project, complete with a handy FAQ. He also points out the PHP The Right Way site and the loads of community contributions that have come in around it. There's guidelines for things like dependency management, security, testing, deployment and lots more. If you haven't gotten a chance to check out this resource, it's definitely work a look!

0 comments voice your opinion now!
ecosystem update language rightway phpfig psr1 psr2 community


Project:
CodeSniffer for PSR's (PSR-0, PSR-1 & PSR-2)
June 09, 2012 @ 11:17:50

Klaus Silveira has created a set of PHP_CodeSniffer rules that can be used to test your code for the recently approved PSR-1 & PSR-2 standards.

This is a PHP_CodeSniffer sniff to check against the PHP Standard Resolutions: PSR-0, PSR-1 and PSR-2. Those standards were approved by the PHP Framework Interoperability Group. You can read more about the PHP FIG and the PSR's on this excellent article by Paul Jones.

The github repository also provides an overview of the standards themselves and how to get these sniffs installed.

0 comments voice your opinion now!
psr codesniffer rules psr0 psr1 psr2


Community News:
Kohana Community Responds to PSR-1 & PSR-2
June 09, 2012 @ 09:10:59

In the Kohana framework, you can get an inside look at the discussion inside a framework community regarding their adherence to the PSR-1 & PSR-2 standards (hint: they're not in favor).

A commentor asks the question "Will Kohana eventually follow the following guidelines?" and is immediately given the simple response of "no". Other comments reinforce this by pointing out some of the differences in the standards that the framwork follows and what the PSR standards outline.

Other posters make comments about the PHP-FIG group themselves, some of the things outlined in the standards and some of their own personal preferences when it comes to the the standards of their own code. You can find more information on the standards here: PSR-1 and PSR-2.

0 comments voice your opinion now!
kohana framework community opinion standards phpfig psr1 psr2


Paul Jones' Blog:
PHP-FIG PSR 1 and 2 Accepted
June 05, 2012 @ 09:27:15

As Paul Jones mentions in his latest post to his site, the much talked-about PSR standards that were proposed by the PHP-FIG group, PSR-1 and PSR-2, have been accepted.

Earlier today, the PHP Framework Interoperability Group accepted two standards recommendations. [...] There's been a lot of commentary about these proposals over the past two weeks, some of it positive and some of it negative.

He includes links to some of the commentary that's been made about the standards recently, and spends some time responding to some of the negative comments specifically, like:

  • What the hell is the "PHP Standards" group? I've never heard of it before now.
  • Why are you guys so secretive and closed?
  • So once I join the list, I can vote on PHP-FIG Standards Recommendations? Sweet!
  • Whatever. I don't need you guys telling me what to do. If I don't want to follow your so-called "standards" then you can't make me.
0 comments voice your opinion now!
psr1 psr2 standard interoperability framework phpfig approval


PHPMaster.com:
PSR-1 and PSR-2 to be Approved as Standards
May 22, 2012 @ 13:18:40

As is mentioned in this new post to PHPMaster.com, the PHP standards group is officially in the voting process on two new standards (PSR-0 being the first) setting up some standard development practices for PHP applications - PSR-1 and PSR-2.

They initially started out as one proposal but the initial round of voting didn't yield a majority in favor. Participants did however see merit in various requirements the decision was made to split it into 2 proposals - one for mandatory interoperability and one for suggested style.

The PSR-1 standard proposes some basic coding standards (like namespacing structure and class/method naming definitions) and the PSR-2 standard covers similar things, but more in-depth with more recommendations.

If you want to find out how your application stacks up against this new standard, you can try out PHP-CS-Fixer (from Fabien Potencier) to see how many things need an update.

0 comments voice your opinion now!
psr0 psr1 psr2 standard coding convention voting



Community Events











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


language component hack hhvm package release facebook application code example install composer unittest symfony2 introduction security framework opinion overview podcast

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