Hi,
I'm testing the sniffs... but they are not detecting the deprecated classes. They are being loaded.... but not detecting the issues. They should detect the presence of JUri or JPlugin.
The testing command:
phpcs -e --standard=...../Joomla /home/.../mytest.php
Output:
Joomla (15 sniffs)
------------------
Joomla.Classes.InstantiateNewClasses
Joomla.Commenting.ClassComment
Joomla.Commenting.FileComment
Joomla.Commenting.FunctionComment
Joomla.Commenting.SingleComment
Joomla.ControlStructures.ControlSignature
Joomla.ControlStructures.ControlStructuresBrackets
Joomla.ControlStructures.WhiteSpaceBefore
Joomla.Deprecated.DeprecatedClasses
Joomla.Deprecated.DeprecatedFunctions
Joomla.Functions.StatementNotFunction
Joomla.NamingConventions.ValidFunctionName
Joomla.NamingConventions.ValidVariableName
Joomla.Operators.ValidLogicalOperators
Joomla.WhiteSpace.MemberVarSpacing
The default command only generates these errors:
----------------------------------------------------------------------
FOUND 12 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
----------------------------------------------------------------------
24 | ERROR | Private member variable "_alias" must not contain a
| | leading underscore
24 | ERROR | Missing member variable doc comment
26 | ERROR | Private member variable "_title" must not contain a
| | leading underscore
26 | ERROR | Missing member variable doc comment
28 | ERROR | Private member variable "_init" must not contain a
| | leading underscore
28 | ERROR | Missing member variable doc comment
30 | ERROR | Private member variable "_helper" must not contain a
| | leading underscore
30 | ERROR | Missing member variable doc comment
69 | WARNING | Line exceeds 150 characters; contains 207 characters
78 | ERROR | Variable "detection_class" is not in valid camel caps
| | format
79 | ERROR | Variable "detection_class" is not in valid camel caps
| | format
79 | ERROR | Variable "detection_class" is not in valid camel caps
| | format
80 | ERROR | Variable "detection_class" is not in valid camel caps
| | format
91 | WARNING | Line exceeds 150 characters; contains 191 characters
----------------------------------------------------------------------
This test is in PHP 7.0.22 and PHPCS 2.9.1.
Thank you in advance!
Anibal