[tracker] Do not flag issues in code comments - attributes pre-8.0
fredden opened this issue · comments
Background
During a routine call with @jrfnl, we discussed #1683. This is a class of bug / possible improvement that should be applied to all affected sniffs.
What needs to be done?
Each sniff in this repository (all of which are listed in the table below) should be reviewed. Most sniffs will not require any changes. The sniffs that need closer review are those that identify issues in attributes - such as new syntax introduced after PHP 8.0. As attributes are treated as comments before PHP 8.0, any new syntax being used in these "comments" should not be flagged as problematic if the code is not expected to run on PHP versions 8.0+.
Tracker
This issue is intended to be a tracker. Individual pull requests should be opened for each sniff requiring changes.
If you would like to claim a sniff, please update the "status" column for the relevant sniff; if you are not able to edit this issue description directly, please add a comment to this issue and someone with sufficient permissions will update the table accordingly.
Sniff | Status |
---|---|
Attributes/NewAttributes | |
Classes/ForbiddenExtendingFinalPHPClass | |
Classes/NewAnonymousClasses | |
Classes/NewClasses | |
Classes/NewConstructorPropertyPromotion | |
Classes/NewConstVisibility | |
Classes/NewFinalConstants | |
Classes/NewLateStaticBinding | |
Classes/NewReadonlyClasses | |
Classes/NewReadonlyProperties | |
Classes/NewTypedProperties | |
Classes/RemovedClasses | |
Classes/RemovedOrphanedParent | |
Constants/NewConstantsInTraits | |
Constants/NewConstants | |
Constants/NewMagicClassConstant | Fixed in #1683 |
Constants/RemovedConstants | |
ControlStructures/DiscouragedSwitchContinue | |
ControlStructures/ForbiddenBreakContinueOutsideLoop | |
ControlStructures/ForbiddenBreakContinueVariableArguments | |
ControlStructures/ForbiddenSwitchWithMultipleDefaultBlocks | |
ControlStructures/NewExecutionDirectives | |
ControlStructures/NewForeachExpressionReferencing | |
ControlStructures/NewListInForeach | |
ControlStructures/NewMultiCatch | |
ControlStructures/NewNonCapturingCatch | |
Extensions/RemovedExtensions | |
FunctionDeclarations/AbstractPrivateMethods | |
FunctionDeclarations/ForbiddenFinalPrivateMethods | |
FunctionDeclarations/ForbiddenParameterShadowSuperGlobals | |
FunctionDeclarations/ForbiddenParametersWithSameName | |
FunctionDeclarations/ForbiddenToStringParameters | |
FunctionDeclarations/ForbiddenVariableNamesInClosureUse | |
FunctionDeclarations/NewClosure | |
FunctionDeclarations/NewExceptionsFromToString | |
FunctionDeclarations/NewNullableTypes | |
FunctionDeclarations/NewParamTypeDeclarations | |
FunctionDeclarations/NewReturnTypeDeclarations | |
FunctionDeclarations/NewTrailingComma | |
FunctionDeclarations/NonStaticMagicMethods | |
FunctionDeclarations/RemovedCallingDestructAfterConstructorExit | |
FunctionDeclarations/RemovedOptionalBeforeRequiredParam | |
FunctionDeclarations/RemovedReturnByReferenceFromVoid | |
FunctionNameRestrictions/NewMagicMethods | |
FunctionNameRestrictions/RemovedMagicAutoload | |
FunctionNameRestrictions/RemovedNamespacedAssert | |
FunctionNameRestrictions/RemovedPHP4StyleConstructors | |
FunctionNameRestrictions/ReservedFunctionNames | |
FunctionUse/ArgumentFunctionsReportCurrentValue | |
FunctionUse/ArgumentFunctionsUsage | |
FunctionUse/NewFunctionParameters | |
FunctionUse/NewFunctions | |
FunctionUse/NewNamedParameters | |
FunctionUse/OptionalToRequiredFunctionParameters | |
FunctionUse/RemovedFunctionParameters | |
FunctionUse/RemovedFunctions | |
FunctionUse/RequiredToOptionalFunctionParameters | |
Generators/NewGeneratorReturn | |
IniDirectives/NewIniDirectives | |
IniDirectives/RemovedIniDirectives | |
InitialValue/NewConstantArraysUsingConst | |
InitialValue/NewConstantArraysUsingDefine | |
InitialValue/NewConstantScalarExpressions | |
InitialValue/NewHeredoc | |
InitialValue/NewNewInDefine | |
InitialValue/NewNewInInitializers | |
Interfaces/InternalInterfaces | |
Interfaces/NewInterfaces | |
Interfaces/RemovedSerializable | |
Keywords/CaseSensitiveKeywords | |
Keywords/ForbiddenNames | |
Keywords/NewKeywords | |
LanguageConstructs/NewEmptyNonVariable | |
LanguageConstructs/NewLanguageConstructs | |
Lists/AssignmentOrder | |
Lists/ForbiddenEmptyListAssignment | |
Lists/NewKeyedList | |
Lists/NewListReferenceAssignment | |
Lists/NewShortList | |
MethodUse/ForbiddenToStringParameters | |
MethodUse/NewDirectCallsToClone | |
Miscellaneous/NewPHPOpenTagEOF | |
Miscellaneous/RemovedAlternativePHPTags | |
Namespaces/ReservedNames | |
Numbers/NewExplicitOctalNotation | |
Numbers/NewNumericLiteralSeparator | |
Numbers/RemovedHexadecimalNumericStrings | |
Numbers/ValidIntegers | |
Operators/ChangedConcatOperatorPrecedence | |
Operators/ForbiddenNegativeBitshift | |
Operators/NewOperators | |
Operators/NewShortTernary | |
Operators/RemovedTernaryAssociativity | |
ParameterValues/ChangedIntToBoolParamType | |
ParameterValues/ChangedObStartEraseFlags | |
ParameterValues/ForbiddenGetClassNoArgsOutsideOO | |
ParameterValues/ForbiddenGetClassNull | |
ParameterValues/ForbiddenSessionModuleNameUser | |
ParameterValues/ForbiddenStripTagsSelfClosingXHTML | |
ParameterValues/NewArrayMergeRecursiveWithGlobalsVar | |
ParameterValues/NewArrayReduceInitialType | |
ParameterValues/NewAssertCustomException | |
ParameterValues/NewFopenModes | |
ParameterValues/NewHashAlgorithms | |
ParameterValues/NewHTMLEntitiesEncodingDefault | |
ParameterValues/NewHTMLEntitiesFlagsDefault | |
ParameterValues/NewIconvMbstringCharsetDefault | |
ParameterValues/NewIDNVariantDefault | |
ParameterValues/NewNegativeStringOffset | |
ParameterValues/NewNumberFormatMultibyteSeparators | |
ParameterValues/NewPackFormat | |
ParameterValues/NewPasswordAlgoConstantValues | |
ParameterValues/NewPCREModifiers | |
ParameterValues/NewProcOpenCmdArray | |
ParameterValues/NewStripTagsAllowableTagsArray | |
ParameterValues/RemovedAssertStringAssertion | |
ParameterValues/RemovedGetClassNoArgs | |
ParameterValues/RemovedGetDefinedFunctionsExcludeDisabledFalse | |
ParameterValues/RemovedHashAlgorithms | |
ParameterValues/RemovedIconvEncoding | |
ParameterValues/RemovedImplodeFlexibleParamOrder | |
ParameterValues/RemovedLdapConnectSignatures | |
ParameterValues/RemovedMbCheckEncodingNoArgs | |
ParameterValues/RemovedMbStrimWidthNegativeWidth | |
ParameterValues/RemovedMbstringModifiers | |
ParameterValues/RemovedMbStrrposEncodingThirdParam | |
ParameterValues/RemovedNonCryptoHash | |
ParameterValues/RemovedPCREModifiers | |
ParameterValues/RemovedSetlocaleString | |
ParameterValues/RemovedSplAutoloadRegisterThrowFalse | |
ParameterValues/RemovedVersionCompareOperators | |
Syntax/ForbiddenCallTimePassByReference | |
Syntax/NewArrayStringDereferencing | |
Syntax/NewArrayUnpacking | Fixed in #1688 |
Syntax/NewClassMemberAccess | |
Syntax/NewDynamicAccessToStatic | |
Syntax/NewFirstClassCallables | |
Syntax/NewFlexibleHeredocNowdoc | |
Syntax/NewFunctionArrayDereferencing | |
Syntax/NewFunctionCallTrailingComma | |
Syntax/NewInterpolatedStringDereferencing | |
Syntax/NewMagicConstantDereferencing | |
Syntax/NewNestedStaticAccess | |
Syntax/NewShortArray | |
Syntax/RemovedCurlyBraceArrayAccess | |
Syntax/RemovedNewReference | |
TextStrings/NewUnicodeEscapeSequence | |
TextStrings/RemovedDollarBraceStringEmbeds | |
TypeCasts/NewTypeCasts | |
TypeCasts/RemovedTypeCasts | |
Upgrade/LowPHP | |
UseDeclarations/NewGroupUseDeclarations | |
UseDeclarations/NewUseConstFunction | |
Variables/ForbiddenGlobalVariableVariable | |
Variables/ForbiddenThisUseContexts | |
Variables/NewUniformVariableSyntax | |
Variables/RemovedIndirectModificationOfGlobals | |
Variables/RemovedPredefinedGlobalVariables |