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

SitePoint PHP Blog:
Git Hooks for Fun and Profit
September 25, 2013 @ 12:45:21

If you're a git user (you do use git, right?), there's a powerful feature that can help perform some automatic actions in your repositories - git hooks. In this new post to the SitePoint PHP blog, Timothy Boronczyk introduces you to them and how to set them up.

When certain commands are run, Git searches the .git/hooks directory for suitable hook scripts which are then executed if found. You'll find a small set of example scripts there (you can activate them by renaming them to remove the .sample prefix and setting their executable bit), and a complete list of hooks can be found in the githooks(5) man page. This article suggests a handful of hooks which can streamline development and help improve your efficiency.

He gives four different examples of checks based on the state of the commit (like pre-commit or post-commit):

  • Lint Checks
  • Spell-Check Commit Messages
  • Checking Standards
  • Automatically Run Composer

Each comes with the example code needed to implement them and some description about what they're doing.

0 comments voice your opinion now!
git hooks introduction example lint spelling standards composer

Link: http://www.sitepoint.com/git-hooks-fun-profit

Michelangelo van Dam's Blog:
Quality Assurance on PHP projects (and PHPLint)
July 15, 2011 @ 08:26:32

Michelangelo van Dam has started a new series of posts on his blog about quality assurance in PHP projects with this introduction and a look at the first tool on his list PHPLint.

Quality Assurance has become an increasing important part of web application development, especially with PHP applications. [...] Luckily there are a lot of tools available that allows you to increase quality of these web applications, and the best part is they are all based on PHP! Let's have a quick look at what tools are interesting to start improving quality assurance on your PHP projects.

The first tool, PHPLint, helps you validate code against syntax errors and is built into the command-line PHP you already have. He describes its use, both on the command-line and in a pre-commit hook on his git repository

For more PHP QA-related information, he also points out the book from Sebastian Bergmann and Stefan Priebsch as a good reference too.

0 comments voice your opinion now!
lint check quality assurance project tool


Content With Style:
Quick lint check on changed php files with svn st and xargs
October 20, 2009 @ 08:27:24

On the Content with Style blog, there's a "quickie" you can drop into a subversion hook as a part of your check-in that will run the lint command on only the changed files (not your entire repository).

If you haven't done it in a hook already, here's the quick way to check all your changed files for syntax errors.

This sort of command would be the most useful in a pre-commit hook to ensure that everything passes correctly. Their example only looks for ".php" files, but can be modified easily if you happen to use ".html" or another custom extension for your pages too.

0 comments voice your opinion now!
lint check svn xargs changed


Stoyan Stefanov's Blog:
PHP/Javascript dev tools for TextPad
July 16, 2007 @ 12:54:00

Stoyan Stefanov posts about some handy PHP development tools that he's added to his TextPad software and wanted to share with the community.

There's four tools in the list (links off of his Tools menu):

  • PHP lint (a.k.a. syntax check)
  • PHP help
  • PHP Manual
  • JS Lint

On ones like the PHP manual, it's really a link to a browser that opens the right page on the PHP.net website.

0 comments voice your opinion now!
textpad tool update lint help manual integrate textpad tool update lint help manual integrate



Community Events





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


podcast introduction opinion framework list tips api community library deployment symfony package series voicesoftheelephpant release bugfix install language laravel interview

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