The SVN server appears to run PHP 5.4…

The SVNSVN Apache Subversion (often abbreviated SVN, after its command name svn) is a software versioning and revision control system. Software developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly compatible successor to the widely used Concurrent Versions System (CVS). WordPress core and the released code are all centrally managed through SVN. server appears to run PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. 5.4 now. For most repositories (notably coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.), we strongly benefit from pre-commit syntax checking to be PHP 5.2.

I think we need to install PHP 5.2 (old, I know) on this server. Then, a pre-commit hook can use php52 -l as needed.

There are a select few files (in our unit tests) that use 5.3 syntax, but I can patch around that in core’s pre-commit hook.

There are other options for verifying that files can be parsed (like a continuous integration procedure), but nothing beats an immediate commit rejection.

#php, #svn