JakubOnderka / PHP-Parallel-Lint

This tool check syntax of PHP files faster than serial check with fancier output.
Other
647 stars 62 forks source link

how to set php version checking #53

Closed KonstantinKuklin closed 8 years ago

KonstantinKuklin commented 9 years ago

Hi, thx for the interesting tool, but I have a project running on php 5.3, how I can check php syntax with rules for 5.3 version, I mean if somebody by chance commit code with "trait", "yield" must be an a errors, but if I set version 5.5 - must be ok. How I can configure such cases?

fduch commented 9 years ago

@KonstantinKuklin since PHP-Parallel-Lint uses php -l to validate source code you should execute lint check in exactly the same environment that is used to run your php application to receive relevant result .

JakubOnderka commented 9 years ago

You must have installed PHP 5.3 version on your computer and give path to this executable in '-p' argument.

On my computer, I have installed PHP 5.3 as 'php53', so if I need test code against PHP 5.3, I just run './parallel-lint -p php53 .'