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

Fabien Potencier:
PHP CS Fixer finally reaches version 1.0
November 13, 2014 @ 09:34:34

Fabien Potencier has a new post to his site talking about a milestone for the PHP-CS Fixer tool (used to fix code to be compliant to the PSR-1 & PSR-2 standards) - a full, stable 1.0 release.

A few years ago, I wrote a small script to automatically fix some common coding standard mistakes people made in Symfony pull requests. It was after I got bored about all the comments people made on pull requests to ask contributors to fix their coding standards. [...] After a while, I decided to Open-Source the tool, like I do with almost all the code I write. [...] To my surprise, people started to use it on their own code, found bugs, found edge cases, added more fixers, and soon enough, we all realise that using regular expressions for such things is doomed to fail.

In recent months the tool has undergone a rewrite to work with the tokens instead of regular expressions (lead by Dariusz Ruminski) and the 1.0 release of this updated version has been made:

After 13,000 additions and 5,000 deletions, I'm very proud to announce version 1.0 of PHP-CS-Fixer; it is smarter, it is more robust, and it has more fixers. Any downsides? Yes, speed; the tool is much slower, but it is worth it and enabling the new cache layer helps a lot.
0 comments voice your opinion now!
phpcs fixer tool release stable v1 fabienpotencier dariuszruminski psr2 psr1

Link: http://fabien.potencier.org/article/76/php-cs-fixer-finally-reaches-version-1-0

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 News:
Drafts of PSR-1 (and prelim PSR-2)
May 11, 2012 @ 13:17:08

In the wake of the success of the PSR-0 standard (used in autoloading structures across frameworks and various applications), the PHP-FIG (Framework Interoperability Group) has start on drafts of other standards to help provide some guidelines to standardize PHP development across projects.

Among the group, Paul Jones has been writing serveral proposals under the PSR-1 standard banner that include:

If you want to know more about the PHP-FIG group, you should listen to this excellent panel interview of the group from the Voices of the ElePHPant podcast. Paul and others get into the point of the group and how the standards are progressing.

0 comments voice your opinion now!
phpfig interoperability group psr0 psr1 psr2 pauljones



Community Events





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


interview version podcast release tool laravel composer opinion community symfony package language library framework introduction voicesoftheelephpant application install series security

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