[TYPO3-dev] SVN pre-commit hooks to avoid commiting php files with syntax errors

Dan Osipov dosipov at phillyburbs.com
Mon Sep 21 20:02:01 CEST 2009


FYI, did you check this with PHP 5.3 code? Most IDEs (with a few 
exceptions) regard PHP namespaces as syntax violations, however FLOW3 
uses them.

Dan Osipov
Calkins Media
http://danosipov.com/blog/

Fabrizio Branca wrote:
> Hi there,
> 
> today I played around with subversion's pre-commit hook. Checking php 
> syntax errors with php lint (which uses php's original parser) can be 
> used to avoid php files with syntax errors to be committed. Your client 
> will show a detailed custom error message why this submit was not accepted.
> 
> I tried this on my subversion server and it worked fine. Of course this 
> is only "poor man's continuous integration server", but still extremely 
> useful.
> 
> As I got some feedback, that this should/could go into forge I'd to post 
> this here. I think this would be a great idea!
> 
> It's quite easy. I used the hook from here
> 
> http://blueparabola.com/blog/subversion-commit-hooks-php
> 
> And here are some hints how to install it:
> 
> http://wordaligned.org/articles/a-subversion-pre-commit-hook
> 
> What do you think? Good Idea? Sebastian, you're "Mr. Forge", aren't you? 
> :) Could you do this?
> 
> Bye,
> 
> Fabrizio




More information about the TYPO3-dev mailing list