Edit report at https://bugs.php.net/bug.php?id=64184&edit=1

 ID:                 64184
 Updated by:         ras...@php.net
 Reported by:        andyearnshaw at gmail dot com
 Summary:            Enhance the -l (Lint) command line option
 Status:             Wont fix
 Type:               Feature/Change Request
 Package:            *General Issues
 Operating System:   Any
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

You could read the UPGRADING doc we provide with every new release.


Previous Comments:
------------------------------------------------------------------------
[2013-02-11 23:38:24] andyearnshaw at gmail dot com

That's a shame.  One of the annoying things about not keeping up with every 
single PHP release is that you don't know things are deprecated until you've 
spent time developing and then check the error logs during the testing phase.  
Then you have to either spend time rewriting the code or live with using 
deprecated functions for a while.

------------------------------------------------------------------------
[2013-02-11 23:33:23] ras...@php.net

That would require writing a static analyzer which is outside our scope at this 
point. Right now it simply runs the compile-phase and none of the things you 
are 
asking for can be done by the compiler. The executor can do some of this, but 
not 
without actually executing the script, which you don't want. The closest thing 
to 
a full static analyzer is Facebook's HipHop project if you run it in 
analyze-only 
mode.

------------------------------------------------------------------------
[2013-02-10 13:27:23] andyearnshaw at gmail dot com

Description:
------------
It would be great if the command line -l option could be enhanced to do more 
than 
just syntax checking.  It would be infinitely more useful if it could also 
output 
warnings for the following:

 - Use of deprecated functions
 - Correct number of function arguments
 - Other useful warnings (creating default object from empty value, etc)
 - Optionally, best practices

This would make it more akin to the JavaScript linters available, with the 
added 
benefit of always being relevant to the version of PHP installed.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64184&edit=1

Reply via email to