sdc-build-wp 4.1.0 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/composer.json +2 -3
  2. package/composer.lock +3 -313
  3. package/index.js +38 -21
  4. package/lib/blocks.js +8 -6
  5. package/lib/style.js +17 -0
  6. package/package.json +1 -1
  7. package/vendor/composer/autoload_classmap.php +0 -37
  8. package/vendor/composer/autoload_psr4.php +0 -1
  9. package/vendor/composer/autoload_real.php +2 -0
  10. package/vendor/composer/autoload_static.php +0 -53
  11. package/vendor/composer/installed.json +1 -329
  12. package/vendor/composer/installed.php +3 -39
  13. package/vendor/composer/platform_check.php +26 -0
  14. package/lib/bustCache.js +0 -14
  15. package/vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md +0 -22
  16. package/vendor/dealerdirect/phpcodesniffer-composer-installer/README.md +0 -285
  17. package/vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json +0 -71
  18. package/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php +0 -637
  19. package/vendor/phpcsstandards/phpcsextra/CHANGELOG.md +0 -590
  20. package/vendor/phpcsstandards/phpcsextra/LICENSE +0 -165
  21. package/vendor/phpcsstandards/phpcsextra/Modernize/Docs/FunctionCalls/DirnameStandard.xml +0 -40
  22. package/vendor/phpcsstandards/phpcsextra/Modernize/Sniffs/FunctionCalls/DirnameSniff.php +0 -382
  23. package/vendor/phpcsstandards/phpcsextra/Modernize/ruleset.xml +0 -5
  24. package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Docs/Arrays/ArrayBraceSpacingStandard.xml +0 -94
  25. package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Docs/Arrays/CommaAfterLastStandard.xml +0 -43
  26. package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/ArrayBraceSpacingSniff.php +0 -305
  27. package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/CommaAfterLastSniff.php +0 -226
  28. package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/ruleset.xml +0 -5
  29. package/vendor/phpcsstandards/phpcsextra/README.md +0 -573
  30. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/DisallowShortArraySyntaxStandard.xml +0 -27
  31. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/DuplicateArrayKeyStandard.xml +0 -44
  32. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/MixedArrayKeyTypesStandard.xml +0 -40
  33. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/MixedKeyedUnkeyedArrayStandard.xml +0 -31
  34. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/DisallowAnonClassParenthesesStandard.xml +0 -24
  35. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/DisallowFinalClassStandard.xml +0 -25
  36. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/ModifierKeywordOrderStandard.xml +0 -27
  37. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/RequireAnonClassParenthesesStandard.xml +0 -23
  38. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/RequireFinalClassStandard.xml +0 -25
  39. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/ConstructorDestructorReturnStandard.xml +0 -64
  40. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/ForeachUniqueAssignmentStandard.xml +0 -26
  41. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoDoubleNegativeStandard.xml +0 -27
  42. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoEchoSprintfStandard.xml +0 -25
  43. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/StaticInFinalClassStandard.xml +0 -43
  44. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/LowercaseClassResolutionKeywordStandard.xml +0 -23
  45. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/ModifierKeywordOrderStandard.xml +0 -30
  46. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/UppercaseMagicConstantsStandard.xml +0 -25
  47. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/DisallowAlternativeSyntaxStandard.xml +0 -35
  48. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/DisallowLonelyIfStandard.xml +0 -49
  49. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/IfElseDeclarationStandard.xml +0 -37
  50. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Files/SeparateFunctionsFromOOStandard.xml +0 -45
  51. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/FunctionDeclarations/NoLongClosuresStandard.xml +0 -42
  52. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/FunctionDeclarations/RequireFinalMethodsInTraitsStandard.xml +0 -33
  53. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Lists/DisallowLongListSyntaxStandard.xml +0 -23
  54. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Lists/DisallowShortListSyntaxStandard.xml +0 -23
  55. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/DisallowCurlyBraceSyntaxStandard.xml +0 -27
  56. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/DisallowDeclarationWithoutNameStandard.xml +0 -25
  57. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/EnforceCurlyBraceSyntaxStandard.xml +0 -27
  58. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/OneDeclarationPerFileStandard.xml +0 -27
  59. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/NamingConventions/NoReservedKeywordParameterNamesStandard.xml +0 -23
  60. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/OOStructures/AlphabeticExtendsImplementsStandard.xml +0 -27
  61. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/ConcatPositionStandard.xml +0 -31
  62. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowLogicalAndOrStandard.xml +0 -30
  63. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowShortTernaryStandard.xml +0 -26
  64. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowStandalonePostIncrementDecrementStandard.xml +0 -44
  65. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/StrictComparisonsStandard.xml +0 -29
  66. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/TypeSeparatorSpacingStandard.xml +0 -33
  67. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/LowercasePHPTagStandard.xml +0 -25
  68. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/OneStatementInShortEchoTagStandard.xml +0 -41
  69. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowMixedGroupUseStandard.xml +0 -39
  70. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseClassStandard.xml +0 -25
  71. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseConstStandard.xml +0 -25
  72. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseFunctionStandard.xml +0 -25
  73. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/KeywordSpacingStandard.xml +0 -29
  74. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/LowercaseFunctionConstStandard.xml +0 -25
  75. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/NoLeadingBackslashStandard.xml +0 -23
  76. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/NoUselessAliasesStandard.xml +0 -30
  77. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/AnonClassKeywordSpacingStandard.xml +0 -31
  78. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/CommaSpacingStandard.xml +0 -94
  79. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/DisallowInlineTabsStandard.xml +0 -25
  80. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/PrecisionAlignmentStandard.xml +0 -29
  81. package/vendor/phpcsstandards/phpcsextra/Universal/Helpers/DummyTokenizer.php +0 -60
  82. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php +0 -89
  83. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php +0 -297
  84. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/MixedArrayKeyTypesSniff.php +0 -174
  85. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/MixedKeyedUnkeyedArraySniff.php +0 -134
  86. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/DisallowAnonClassParenthesesSniff.php +0 -112
  87. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/DisallowFinalClassSniff.php +0 -116
  88. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/ModifierKeywordOrderSniff.php +0 -188
  89. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/RequireAnonClassParenthesesSniff.php +0 -81
  90. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/RequireFinalClassSniff.php +0 -102
  91. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php +0 -211
  92. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/ForeachUniqueAssignmentSniff.php +0 -153
  93. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/NoDoubleNegativeSniff.php +0 -269
  94. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/NoEchoSprintfSniff.php +0 -131
  95. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/StaticInFinalClassSniff.php +0 -216
  96. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/LowercaseClassResolutionKeywordSniff.php +0 -106
  97. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/ModifierKeywordOrderSniff.php +0 -199
  98. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/UppercaseMagicConstantsSniff.php +0 -89
  99. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/DisallowAlternativeSyntaxSniff.php +0 -216
  100. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/DisallowLonelyIfSniff.php +0 -348
  101. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/IfElseDeclarationSniff.php +0 -164
  102. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Files/SeparateFunctionsFromOOSniff.php +0 -190
  103. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/FunctionDeclarations/NoLongClosuresSniff.php +0 -233
  104. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/FunctionDeclarations/RequireFinalMethodsInTraitsSniff.php +0 -120
  105. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Lists/DisallowLongListSyntaxSniff.php +0 -71
  106. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Lists/DisallowShortListSyntaxSniff.php +0 -86
  107. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/DisallowCurlyBraceSyntaxSniff.php +0 -81
  108. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/DisallowDeclarationWithoutNameSniff.php +0 -80
  109. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/EnforceCurlyBraceSyntaxSniff.php +0 -81
  110. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/OneDeclarationPerFileSniff.php +0 -96
  111. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/NamingConventions/NoReservedKeywordParameterNamesSniff.php +0 -190
  112. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/OOStructures/AlphabeticExtendsImplementsSniff.php +0 -275
  113. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/ConcatPositionSniff.php +0 -204
  114. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowLogicalAndOrSniff.php +0 -112
  115. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowShortTernarySniff.php +0 -76
  116. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowStandalonePostIncrementDecrementSniff.php +0 -197
  117. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/StrictComparisonsSniff.php +0 -116
  118. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/TypeSeparatorSpacingSniff.php +0 -85
  119. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/LowercasePHPTagSniff.php +0 -87
  120. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/OneStatementInShortEchoTagSniff.php +0 -101
  121. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowMixedGroupUseSniff.php +0 -248
  122. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseClassSniff.php +0 -211
  123. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseConstSniff.php +0 -211
  124. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseFunctionSniff.php +0 -211
  125. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/KeywordSpacingSniff.php +0 -207
  126. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/LowercaseFunctionConstSniff.php +0 -156
  127. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/NoLeadingBackslashSniff.php +0 -170
  128. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/NoUselessAliasesSniff.php +0 -155
  129. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/AnonClassKeywordSpacingSniff.php +0 -79
  130. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/CommaSpacingSniff.php +0 -408
  131. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php +0 -173
  132. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/PrecisionAlignmentSniff.php +0 -445
  133. package/vendor/phpcsstandards/phpcsextra/Universal/ruleset.xml +0 -5
  134. package/vendor/phpcsstandards/phpcsextra/composer.json +0 -69
  135. package/vendor/phpcsstandards/phpcsutils/.phpdoc.xml.dist +0 -36
  136. package/vendor/phpcsstandards/phpcsutils/CHANGELOG.md +0 -1106
  137. package/vendor/phpcsstandards/phpcsutils/LICENSE +0 -165
  138. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php +0 -551
  139. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCFile.php +0 -781
  140. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCTokens.php +0 -123
  141. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/Helper.php +0 -202
  142. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php +0 -44
  143. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestFileNotFound.php +0 -47
  144. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestMarkerNotFound.php +0 -43
  145. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestTargetNotFound.php +0 -50
  146. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Fixers/SpacesFixer.php +0 -246
  147. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/Cache.php +0 -218
  148. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrList.php +0 -687
  149. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrListWithCache.php +0 -269
  150. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/NoFileCache.php +0 -164
  151. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/StableCollections.php +0 -75
  152. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/UtilityMethodTestCase.php +0 -459
  153. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php +0 -837
  154. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php +0 -55
  155. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Arrays.php +0 -227
  156. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Conditions.php +0 -156
  157. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Context.php +0 -232
  158. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ControlStructures.php +0 -276
  159. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FunctionDeclarations.php +0 -828
  160. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/GetTokensAsString.php +0 -262
  161. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Lists.php +0 -359
  162. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/MessageHelper.php +0 -145
  163. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Namespaces.php +0 -389
  164. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/NamingConventions.php +0 -116
  165. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Numbers.php +0 -322
  166. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ObjectDeclarations.php +0 -359
  167. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Operators.php +0 -252
  168. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Orthography.php +0 -120
  169. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Parentheses.php +0 -419
  170. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/PassedParameters.php +0 -510
  171. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Scopes.php +0 -143
  172. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TextStrings.php +0 -331
  173. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/UseStatements.php +0 -432
  174. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Variables.php +0 -333
  175. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/ruleset.xml +0 -4
  176. package/vendor/phpcsstandards/phpcsutils/README.md +0 -297
  177. package/vendor/phpcsstandards/phpcsutils/composer.json +0 -92
  178. package/vendor/phpcsstandards/phpcsutils/phpcsutils-autoload.php +0 -68
  179. package/vendor/wp-coding-standards/wpcs/CHANGELOG.md +0 -1654
  180. package/vendor/wp-coding-standards/wpcs/LICENSE +0 -21
  181. package/vendor/wp-coding-standards/wpcs/README.md +0 -261
  182. package/vendor/wp-coding-standards/wpcs/WordPress/AbstractArrayAssignmentRestrictionsSniff.php +0 -261
  183. package/vendor/wp-coding-standards/wpcs/WordPress/AbstractClassRestrictionsSniff.php +0 -257
  184. package/vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionParameterSniff.php +0 -111
  185. package/vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionRestrictionsSniff.php +0 -358
  186. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/ArrayIndentationStandard.xml +0 -116
  187. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/ArrayKeySpacingRestrictionsStandard.xml +0 -31
  188. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/MultipleStatementAlignmentStandard.xml +0 -50
  189. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/CodeAnalysis/EscapedNotTranslatedStandard.xml +0 -24
  190. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/DateTime/CurrentTimeTimestampStandard.xml +0 -35
  191. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/DateTime/RestrictedFunctionsStandard.xml +0 -54
  192. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/PrefixAllGlobalsStandard.xml +0 -119
  193. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidHookNameStandard.xml +0 -35
  194. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidPostTypeSlugStandard.xml +0 -121
  195. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/IniSetStandard.xml +0 -40
  196. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/StrictInArrayStandard.xml +0 -53
  197. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/YodaConditionsStandard.xml +0 -27
  198. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Security/SafeRedirectStandard.xml +0 -23
  199. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CapabilitiesStandard.xml +0 -69
  200. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CapitalPDangitStandard.xml +0 -43
  201. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/ClassNameCaseStandard.xml +0 -23
  202. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CronIntervalStandard.xml +0 -45
  203. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedClassesStandard.xml +0 -23
  204. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedFunctionsStandard.xml +0 -23
  205. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedParameterValuesStandard.xml +0 -23
  206. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedParametersStandard.xml +0 -40
  207. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourceParametersStandard.xml +0 -92
  208. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourcesStandard.xml +0 -57
  209. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/PostsPerPageStandard.xml +0 -73
  210. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/CastStructureSpacingStandard.xml +0 -27
  211. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/ControlStructureSpacingStandard.xml +0 -150
  212. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml +0 -19
  213. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/OperatorSpacingStandard.xml +0 -61
  214. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ArrayWalkingFunctionsHelper.php +0 -108
  215. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ConstantsHelper.php +0 -135
  216. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ContextHelper.php +0 -394
  217. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/DeprecationHelper.php +0 -84
  218. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/EscapingFunctionsTrait.php +0 -256
  219. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/FormattingFunctionsHelper.php +0 -60
  220. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/IsUnitTestTrait.php +0 -238
  221. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ListHelper.php +0 -101
  222. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/MinimumWPVersionTrait.php +0 -159
  223. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/PrintingFunctionsTrait.php +0 -122
  224. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/RulesetPropertyHelper.php +0 -73
  225. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/SanitizationHelperTrait.php +0 -418
  226. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/SnakeCaseHelper.php +0 -60
  227. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/UnslashingFunctionsHelper.php +0 -59
  228. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ValidationHelper.php +0 -349
  229. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/VariableHelper.php +0 -262
  230. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPDBTrait.php +0 -115
  231. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPGlobalVariablesHelper.php +0 -312
  232. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPHookHelper.php +0 -113
  233. package/vendor/wp-coding-standards/wpcs/WordPress/Sniff.php +0 -72
  234. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php +0 -252
  235. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayIndentationSniff.php +0 -550
  236. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php +0 -174
  237. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/MultipleStatementAlignmentSniff.php +0 -583
  238. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/CodeAnalysis/AssignmentInTernaryConditionSniff.php +0 -173
  239. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php +0 -89
  240. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php +0 -301
  241. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php +0 -761
  242. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/PreparedSQLSniff.php +0 -242
  243. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/RestrictedClassesSniff.php +0 -57
  244. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/RestrictedFunctionsSniff.php +0 -63
  245. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/SlowDBQuerySniff.php +0 -58
  246. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DateTime/CurrentTimeTimestampSniff.php +0 -168
  247. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DateTime/RestrictedFunctionsSniff.php +0 -59
  248. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Files/FileNameSniff.php +0 -313
  249. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php +0 -1297
  250. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidFunctionNameSniff.php +0 -188
  251. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php +0 -277
  252. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidPostTypeSlugSniff.php +0 -230
  253. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php +0 -289
  254. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DevelopmentFunctionsSniff.php +0 -63
  255. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php +0 -100
  256. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DontExtractSniff.php +0 -52
  257. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/IniSetSniff.php +0 -193
  258. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/NoSilencedErrorsSniff.php +0 -245
  259. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/POSIXFunctionsSniff.php +0 -73
  260. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/PregQuoteDelimiterSniff.php +0 -70
  261. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/RestrictedPHPFunctionsSniff.php +0 -45
  262. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/StrictInArraySniff.php +0 -122
  263. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/TypeCastsSniff.php +0 -90
  264. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/YodaConditionsSniff.php +0 -124
  265. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/EscapeOutputSniff.php +0 -903
  266. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/NonceVerificationSniff.php +0 -422
  267. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/PluginMenuSlugSniff.php +0 -126
  268. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/SafeRedirectSniff.php +0 -45
  269. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/ValidatedSanitizedInputSniff.php +0 -244
  270. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Utils/I18nTextDomainFixerSniff.php +0 -862
  271. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/AlternativeFunctionsSniff.php +0 -371
  272. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CapabilitiesSniff.php +0 -478
  273. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CapitalPDangitSniff.php +0 -315
  274. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/ClassNameCaseSniff.php +0 -897
  275. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CronIntervalSniff.php +0 -321
  276. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedClassesSniff.php +0 -152
  277. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php +0 -1708
  278. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php +0 -291
  279. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedParametersSniff.php +0 -509
  280. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php +0 -160
  281. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DiscouragedFunctionsSniff.php +0 -54
  282. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/EnqueuedResourceParametersSniff.php +0 -241
  283. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/EnqueuedResourcesSniff.php +0 -108
  284. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php +0 -436
  285. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php +0 -977
  286. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/PostsPerPageSniff.php +0 -102
  287. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/CastStructureSpacingSniff.php +0 -59
  288. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php +0 -486
  289. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php +0 -63
  290. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/OperatorSpacingSniff.php +0 -60
  291. package/vendor/wp-coding-standards/wpcs/WordPress/ruleset.xml +0 -13
  292. package/vendor/wp-coding-standards/wpcs/WordPress-Core/ruleset.xml +0 -948
  293. package/vendor/wp-coding-standards/wpcs/WordPress-Docs/ruleset.xml +0 -109
  294. package/vendor/wp-coding-standards/wpcs/WordPress-Extra/ruleset.xml +0 -199
  295. package/vendor/wp-coding-standards/wpcs/composer.json +0 -88
  296. package/vendor/wp-coding-standards/wpcs/phpcs.xml.dist.sample +0 -153
@@ -1,1106 +0,0 @@
1
- # Change Log for PHPCSUtils for PHP CodeSniffer
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- This projects adheres to [Keep a CHANGELOG](https://keepachangelog.com/) and uses [Semantic Versioning](https://semver.org/).
6
-
7
-
8
- ## [Unreleased]
9
-
10
- _Nothing yet._
11
-
12
- ## [1.0.12] - 2024-05-20
13
-
14
- ### Added
15
-
16
- #### PHPCS BackCompat
17
-
18
- * `BCFile::getMemberProperties()`: sync with PHPCS 3.10.0 - support for PHP 8.2 DNF types. [#604]
19
- * `BCFile::getMethodProperties()`: sync with PHPCS 3.10.0 - support for PHP 8.2 DNF types. [#604]
20
- * `BCFile::getMethodParameters()`: sync with PHPCS 3.10.0 - support for PHP 8.2 DNF types. [#604]
21
-
22
- #### Utils
23
-
24
- * `FunctionDeclarations::getParameters()`: support for PHP 8.2 DNF types. [#604]
25
- * `FunctionDeclarations::getProperties()`: support for PHP 8.2 DNF types. [#604]
26
- * `Variables::getMemberProperties()`: support for PHP 8.2 DNF types. [#604]
27
-
28
- ### Changed
29
-
30
- #### Tokens
31
-
32
- * `Collections::parameterTypeTokens()`, `Collections::propertyTypeTokens()` and `Collections::returnTypeTokens()`: now include the new `T_TYPE_OPEN_PARENTHESIS` and `T_TYPE_CLOSE_PARENTHESIS` tokens for PHP 8.2 DNF type support. [#604]
33
-
34
- #### Utils
35
-
36
- * `ControlStructures::getCaughtExceptions()`: will now silently ignore parse errors in the code under scan which prevent the method from analyzing a `catch` statement. [#594]
37
- The method will now return an empty array instead of throwing a `PHP_CodeSniffer\Exceptions\RuntimeException`.
38
-
39
- #### Other
40
-
41
- * Dropped support for [PHP_CodeSniffer] < 3.10.0. [#603]
42
- Please ensure you run `composer update phpcsstandards/phpcsutils --with-dependencies` to benefit from this.
43
- * Various housekeeping and documentation improvements.
44
-
45
- ### Fixed
46
-
47
- #### Utils
48
-
49
- * `UseStatements::splitImportUseStatement()`: the values in the return array will now never include a leading backslash. [#590]
50
- Previously the behaviour around import `use` statements declared with a leading backslash was undefined and the backslash would be included in the return value.
51
-
52
- [#590]: https://github.com/PHPCSStandards/PHPCSUtils/pull/590
53
- [#594]: https://github.com/PHPCSStandards/PHPCSUtils/pull/594
54
- [#603]: https://github.com/PHPCSStandards/PHPCSUtils/pull/603
55
- [#604]: https://github.com/PHPCSStandards/PHPCSUtils/pull/604
56
-
57
-
58
- ## [1.0.11] - 2024-04-24
59
-
60
- ### Changed
61
-
62
- #### Other
63
-
64
- * Various housekeeping and documentation improvements. Includes a contribution from [@fredden].
65
-
66
- ### Fixed
67
-
68
- #### PHPCS BackCompat
69
-
70
- * `BCFile::getMethodProperties()`: small performance improvement & more defensive coding, in line with same fix in PHPCS 3.9.2. [#573]
71
-
72
- #### Utils
73
-
74
- * `FunctionDeclarations::getProperties()`: small performance improvement & more defensive coding, in line with same fix in PHPCS 3.9.2. [#573]
75
-
76
- [#573]: https://github.com/PHPCSStandards/PHPCSUtils/pull/573
77
-
78
-
79
- ## [1.0.10] - 2024-03-18
80
-
81
- ### Changed
82
-
83
- #### Other
84
-
85
- * Dropped support for [PHP_CodeSniffer] < 3.9.0. [#561]
86
- Please ensure you run `composer update phpcsstandards/phpcsutils --with-dependencies` to benefit from this.
87
- * Various housekeeping and documentation improvements.
88
-
89
- ### Deprecated
90
-
91
- #### Utils
92
-
93
- * `NamingConventions::AZ_UPPER` constant. [#563]
94
- * `NamingConventions::AZ_LOWER` constant. [#563]
95
-
96
- ### Fixed
97
-
98
- #### PHPCS BackCompat
99
-
100
- * `BackCompat\Helper::getEncoding()`: PHP 8.4 deprecation notice. [#568]
101
- * `BackCompat\Helper::ignoreAnnotations()`: PHP 8.4 deprecation notice. [#568]
102
-
103
- [#561]: https://github.com/PHPCSStandards/PHPCSUtils/pull/561
104
- [#563]: https://github.com/PHPCSStandards/PHPCSUtils/pull/563
105
- [#568]: https://github.com/PHPCSStandards/PHPCSUtils/pull/568
106
-
107
-
108
- ## [1.0.9] - 2023-12-08
109
-
110
- ### Added
111
-
112
- #### PHPCS BackCompat
113
-
114
- * `BCFile::getMemberProperties()`: sync with PHPCS 3.8.0 - support for PHP 8.2 `true` type. [#524]
115
- * `BCFile::getMethodProperties()`: sync with PHPCS 3.8.0 - support for PHP 8.2 `true` type. [#524]
116
- * `BCFile::getMethodParameters()`: sync with PHPCS 3.8.0 - support for PHP 8.2 `true` type. [#524]
117
-
118
- ### Changed
119
-
120
- #### TestUtils
121
-
122
- * Significant performance improvement for the [`UtilityMethodTestCase`]. [#525]
123
-
124
- #### Other
125
-
126
- * Dropped support for [PHP_CodeSniffer] < 3.8.0. [#523]
127
- Please ensure you run `composer update phpcsstandards/phpcsutils --with-dependencies` to benefit from this.
128
- * Small improvements to the documentation website generation. Includes a contribution from [@fredden].
129
- * Various housekeeping and documentation improvements. Includes a contribution from [@fredden].
130
-
131
- [#523]: https://github.com/PHPCSStandards/PHPCSUtils/pull/523
132
- [#524]: https://github.com/PHPCSStandards/PHPCSUtils/pull/524
133
- [#525]: https://github.com/PHPCSStandards/PHPCSUtils/pull/525
134
-
135
-
136
- ## [1.0.8] - 2023-07-17
137
-
138
- ### Changed
139
-
140
- #### PHPCS BackCompat
141
-
142
- * `BCFile::getDeclarationName()`: sync with PHPCS 3.8.0 - support for functions called `self`, `parent` or `static` which return by reference. [#494]
143
-
144
- #### Other
145
-
146
- * Various housekeeping and minor documentation improvements.
147
-
148
- ### Fixed
149
-
150
- #### Fixers
151
-
152
- * The [`SpacesFixer`] will no longer throw an (incorrect) exception when the second pointer passed is a comment token and this comment token is the last content in a file. [#493]
153
-
154
- [#493]: https://github.com/PHPCSStandards/PHPCSUtils/pull/493
155
- [#494]: https://github.com/PHPCSStandards/PHPCSUtils/pull/494
156
-
157
-
158
- ## [1.0.7] - 2023-07-10
159
-
160
- ### Changed
161
-
162
- #### Other
163
-
164
- * Various housekeeping and maintenance updates, including making the test suite compatible with PHPUnit 10.
165
-
166
- ### Fixed
167
-
168
- #### Utils
169
-
170
- * The `Arrays::getDoubleArrowPtr()` method could previously get confused over a double arrow in a keyed list used as an array value. [#485]
171
-
172
- [#485]: https://github.com/PHPCSStandards/PHPCSUtils/pull/485
173
-
174
-
175
- ## [1.0.6] - 2023-05-27
176
-
177
- ### Changed
178
-
179
- #### PHPCS BackCompat
180
-
181
- * `BCFile::getClassProperties()`: sync with PHPCS 3.8.0 - support for PHP 8.2 `readonly` classes. [#470]
182
- * `BCFile::getMethodParameters()`: sync with PHPCS 3.8.0 - support for constructor property promotion with `readonly` properties without explicit visibility. [#472]
183
-
184
- #### Utils
185
-
186
- * The results of the following methods will now (also) be cached for improved performance when multiple sniffs call these functions for the same token during a PHPCS run. [#464], [#466]
187
- - `FunctionDeclarations::getProperties()`
188
- - `Variables::getMemberProperties()`
189
- * Additionally, the results of the `UseStatements::splitImportUseStatement()` method will be cached more often and the cache checked earlier. [#467]
190
- * The return value of the `ControlStructures::getCaughtExceptions()` method will no longer contain "empty" entries for catch statements without a named exception. It will return an empty array instead. [#474]
191
-
192
- #### Other
193
-
194
- * Various small housekeeping and maintenance updates.
195
-
196
- ### Fixed
197
-
198
- ### Abstract Sniffs
199
-
200
- * `AbstractArrayDeclarationSniff`: fixed a potential "Trying to access array offset on value of type bool" PHP notice. [#476]
201
- * `AbstractArrayDeclarationSniff`: the abstract will no longer trigger potentially available magic `__get()`/`__set()` etc methods. [#477]
202
-
203
- [#464]: https://github.com/PHPCSStandards/PHPCSUtils/pull/464
204
- [#466]: https://github.com/PHPCSStandards/PHPCSUtils/pull/466
205
- [#467]: https://github.com/PHPCSStandards/PHPCSUtils/pull/467
206
- [#470]: https://github.com/PHPCSStandards/PHPCSUtils/pull/470
207
- [#472]: https://github.com/PHPCSStandards/PHPCSUtils/pull/472
208
- [#474]: https://github.com/PHPCSStandards/PHPCSUtils/pull/474
209
- [#476]: https://github.com/PHPCSStandards/PHPCSUtils/pull/476
210
- [#477]: https://github.com/PHPCSStandards/PHPCSUtils/pull/477
211
-
212
-
213
- ## [1.0.5] - 2023-04-17
214
-
215
- ### Fixed
216
-
217
- #### Utils
218
-
219
- * The `Lists::getAssignments()` method could previously get confused over exotic list keys. Fixed now. [#459]
220
-
221
- [#459]: https://github.com/PHPCSStandards/PHPCSUtils/pull/459
222
-
223
-
224
- ## [1.0.4] - 2023-04-15
225
-
226
- ### Changed
227
-
228
- #### Other
229
-
230
- * Minor documentation improvements.
231
-
232
- ### Fixed
233
-
234
- #### Utils
235
-
236
- * The `FunctionDeclarations::getParameters()` method will now correctly handle constructor promoted properties with `readonly`, but without explicit visibility set. [#456]
237
-
238
- [#456]: https://github.com/PHPCSStandards/PHPCSUtils/pull/456
239
-
240
-
241
- ## [1.0.3] - 2023-04-13
242
-
243
- ### Changed
244
-
245
- #### Other
246
-
247
- * Various small housekeeping and maintenance updates.
248
-
249
- ### Fixed
250
-
251
- #### Utils
252
-
253
- * The `PassedParameters` class now allows for function calls to global functions called `self()`, `parent()` or `static()`. [#452]
254
-
255
- [#452]: https://github.com/PHPCSStandards/PHPCSUtils/pull/452
256
-
257
-
258
- ## [1.0.2] - 2023-03-28
259
-
260
- ### Changed
261
-
262
- #### Tokens
263
-
264
- * The `Collections::arrayOpenTokensBC()`, `Collections::arrayTokensBC()`, `Collections::listOpenTokensBC()`, `Collections::listTokensBC()`, `Collections::shortArrayListOpenTokensBC()`, `Collections::shortArrayTokensBC()` and `Collections::shortListTokensBC()` token arrays will no longer contain the `T_OPEN_SQUARE_BRACKET` and/or the `T_CLOSE_SQUARE_BRACKET` token constants if PHP_CodeSniffer 3.7.2 or higher is used. [#444]
265
- An upstream bugfix makes it unnecessary to check those tokens for being a short array or short list.
266
- Sniff which use these token arrays is combination with using the `Arrays`/`Lists` classes, should experience a performance boost on PHPCS 3.7.2+ due to this change.
267
-
268
- #### Other
269
-
270
- * Minor documentation improvements.
271
- * Various small housekeeping and maintenance updates.
272
-
273
- ### Fixed
274
-
275
- #### Utils
276
-
277
- * The `Lists::isShortList()` method will now correctly recognize a short list nested in a long list as a short list. [#446]
278
- Note: this is a parse error in PHP, but the method should still handle this correctly.
279
-
280
- [#444]: https://github.com/PHPCSStandards/PHPCSUtils/pull/444
281
- [#446]: https://github.com/PHPCSStandards/PHPCSUtils/pull/446
282
-
283
-
284
- ## [1.0.1] - 2023-01-05
285
-
286
- ### Changed
287
-
288
- #### Other
289
-
290
- * Composer: The version requirements for the [Composer PHPCS plugin] have been widened to allow for version 1.0.0. [#428]
291
- Please ensure you run `composer update phpcsstandards/phpcsutils --with-dependencies` to benefit from this.
292
- * Removed the references to pre-1.0.0 QA releases from the docs. [#425]
293
- * Various small housekeeping and maintenance updates. Thanks [@szepeviktor] for contributing.
294
-
295
- [#425]: https://github.com/PHPCSStandards/PHPCSUtils/pull/425
296
- [#428]: https://github.com/PHPCSStandards/PHPCSUtils/pull/428
297
-
298
-
299
- ## [1.0.0] - 2023-01-04
300
-
301
- For the full list of features, please see the changelogs of the alpha/rc releases:
302
- * [1.0.0-rc1](https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.0.0-rc1)
303
- * [1.0.0-alpha4](https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.0.0-alpha4)
304
- * [1.0.0-alpha3](https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.0.0-alpha3)
305
- * [1.0.0-alpha2](https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.0.0-alpha2)
306
- * [1.0.0-alpha1](https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.0.0-alpha1)
307
-
308
- ### Changed
309
-
310
- #### Other
311
-
312
- * Minor documentation improvements.
313
- * Maintainability improvements.
314
-
315
-
316
- ## [1.0.0-rc1] - 2022-12-27
317
-
318
- ### Added
319
-
320
- #### Tokens
321
-
322
- * New [`Collections::constantModifierKeywords()`][`Collections`] method. [#400]
323
- * New [`Collections::listOpenTokensBC()`][`Collections`] method. [#405]
324
-
325
- ### Changed
326
-
327
- #### Utils
328
-
329
- * `ObjectDeclarations::getClassProperties()`: the array return value will now include `'abstract_token'`, `'final_token'`, and `'readonly_token'` indexes identifying the stack pointers to these keyword, where applicable. If the keyword is not used, the value will be set to `false`. [#401]
330
-
331
- #### Other
332
-
333
- * Various housekeeping and CI maintenance.
334
-
335
- ### Removed
336
-
337
- Everything which was previously deprecated in the [1.0.0-alpha4 release], has now been removed. [#410]
338
-
339
- This includes:
340
- * The `PHPCS23Utils` standard.
341
- * [`Collections`] class: direct access to the properties in the class.
342
- * [`Collections`] class: the `Collections::arrowFunctionTokensBC()`, `Collections::functionDeclarationTokensBC()`, `Collections::parameterTypeTokensBC()`, `Collections::propertyTypeTokensBC()` and `Collections::returnTypeTokensBC()` methods.
343
- * The `ControlStructures::getDeclareScopeOpenClose()` method.
344
- * The `FunctionDeclarations::getArrowFunctionOpenClose()` method.
345
- * The `FunctionDeclarations::isArrowFunction()` method.
346
-
347
- See the changelog for the [1.0.0-alpha4 release] for details about replacements for the removed functionality.
348
-
349
- ### Fixed
350
-
351
- #### Utils
352
-
353
- * `Arrays::getOpenClose()`: small efficiency fix. [#406]
354
- * `ControlStructures::hasBody()`: correctly identify that a control structure does not have a body - `'has_body' = false` -, when the control structure is ended by a PHP close tag. [#403]
355
- * `Lists::getOpenClose()`: small efficiency fix. [#407]
356
-
357
- [1.0.0-alpha4 release]: https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.0.0-alpha4
358
-
359
- [#400]: https://github.com/PHPCSStandards/PHPCSUtils/pull/400
360
- [#401]: https://github.com/PHPCSStandards/PHPCSUtils/pull/401
361
- [#403]: https://github.com/PHPCSStandards/PHPCSUtils/pull/403
362
- [#405]: https://github.com/PHPCSStandards/PHPCSUtils/pull/405
363
- [#406]: https://github.com/PHPCSStandards/PHPCSUtils/pull/406
364
- [#407]: https://github.com/PHPCSStandards/PHPCSUtils/pull/407
365
- [#410]: https://github.com/PHPCSStandards/PHPCSUtils/pull/410
366
-
367
-
368
- ## [1.0.0-alpha4] - 2022-10-25
369
-
370
- Notes:
371
- * While still in alpha, some BC-breaks may be introduced. These are clearly indicated in the changelog with the :warning: symbol.
372
- * Until PHPCS 4.x has been released, PHPCSUtils does not formally support it, though an effort is made to keep up with the changes and anticipate potential compatibility issues.
373
- For testing purposes only, the composer configuration allows for PHPCSUtils to be installed with PHPCS 4.x.
374
-
375
- ### Breaking Changes
376
-
377
- Support for PHP_CodeSniffer < 3.7.1 has been dropped after consultation with the principle external standards which depend on PHPCSUtils. [#347]
378
-
379
- This was unfortunately necessary as the incessant additions of new syntaxes since PHP 7.4 made it impossible to continue to support PHPCS < 3.7.1, while still providing reliable results for modern PHP code.
380
-
381
- ### Added
382
-
383
- Now support for PHPCS < 3.7.1 has been dropped, this edition adds support to all functionality in PHPCSUtils for new syntaxes and features from PHP 8.0 and 8.1 and preliminary support for PHP 8.2.
384
-
385
- This means that support for the following syntaxes/features has been added (or existing support verified/improved):
386
- * PHP 7.4
387
- - Array unpacking in array expressions.
388
- * PHP 8.0
389
- - The `mixed` type. [#163]
390
- - Union types, including supporting the `false` and `null` types. [#168], [#225]
391
- - Constructor property promotion. [#169], [#226]
392
- - Nullsafe object operators. [#176], [#183]
393
- - Namespaced names as single token (cross-version PHPCS 3.x vs 4.x). [#205], [#206], [#207], [#208], [#209], [#210], [#211], [#212], [#213], [#217], [#241]
394
- - Dereferencing of interpolated text strings.
395
- - Named arguments in function calls. [#235], [#243], [#383]
396
- - Match expressions. [#247], [#335], [#356]
397
- - Trailing commas in parameter lists and closure `use` lists.
398
- - Attributes. [#357]
399
- * PHP 8.1
400
- - Enumerations. [#285], [#358]
401
- - Explicit octal notation. [#293]
402
- - Array unpacking with string keys.
403
- - `never` type.
404
- - Named parameters after argument unpacking. [#383]
405
- - First class callables. [#362]
406
- - Readonly properties. [#363]
407
- - `new` in initializers.
408
- - Intersection types. [#365]
409
- * PHP 8.2
410
- - Constants in traits. [#366]
411
- - Readonly classes. [#367]
412
- - `true` type. [#368]
413
- - `null` and `false` as stand-alone types.
414
-
415
- Please report any bugs/oversights you encounter!
416
-
417
- #### PHPCS Backcompat
418
-
419
- * `BCTokens::magicConstants()` as introduced in PHPCS 3.5.6. [#172]
420
- The same token array previously already existed in PHPCSUtils as `Collections::$magicConstants` (which has now been deprecated).
421
-
422
- #### TestUtils
423
-
424
- * New [`UtilityMethodTestCase::usesPhp8NameTokens()`][UtilityMethodTestCase::usesPhp8NameTokens] method as a helper for tests using token position calculations when testing against both PHPCS 3.x as well as 4.x. [#200], [#217], [#241]
425
-
426
- #### Tokens
427
-
428
- * New [`PHPCSUtils\Tokens\TokenHelper`][`TokenHelper`] class: Utility functions for working with tokens and token collections. [#304]
429
- This class initially contains a `tokenExists()` method to work around potential interference from PHP-Parser also backfilling tokens.
430
- :point_right: External standards using a function call to `defined()` to determine whether a token is available should replace those with a function call to the `TokenHelper::tokenExists()` method.
431
- * New [`Collections::arrayOpenTokensBC()`][`Collections`] method. [#233], [#311]
432
- * New [`Collections::functionCallTokens()`][`Collections`] method to retrieve the tokens which can represent function calls and function-call-like language constructs, like class instantiations. [#233]
433
- * New [`Collections::nameTokens()`][`Collections`] method to retrieve the tokens which can be used for "names", be it namespace, OO, function or constant names. [#204], [#217]
434
- * New [`Collections::namespacedNameTokens()`][`Collections`] method to retrieve the tokens which can be encountered in a fully, partially or unqualified name and in namespace relative names. [#202], [#217]
435
- * New [`Collections::parameterPassingTokens()`][`Collections`] method to retrieve the tokens which can be passed to the methods in the [`PassedParameters`] class. [#233]
436
- * New [`Collections::phpOpenTags()`][`Collections`] method. [#254]
437
- * New [`Collections::shortArrayListOpenTokensBC()`][`Collections`] method. [#381]
438
-
439
- #### Utils
440
-
441
- * New [`PHPCSUtils\Utils\Context`][`Context`] class: Utility functions to determine the context in which an arbitrary token is used. [#219]. [#390]
442
- Initial set of available methods: `inEmpty()`, `inIsset()`, `inUnset()`, `inAttribute`, `inForeachCondition()` and `inForCondition()`.
443
- * New [`PHPCSUtils\Utils\MessageHelper`][`MessageHelper`] class: Utility functions for creating error/warning messages. [#249], [#391]
444
- Initial set of available methods: `addMessage()`, `addFixableMessage()`, `stringToErrorcode()` and `showEscapeChars()`.
445
- * New [`PHPCSUtils\Utils\PassedParameters::getParameterFromStack()`][PassedParameters::getParameterFromStack] efficiency method to retrieve a potentially named function call parameter from a parameter information stack as previously retrieved via `PassedParameters::getParameters()`. [#235], [#237], [#383]
446
- * New [`PHPCSUtils\Utils\TextStrings::getEndOfCompleteTextString()`][TextStrings::getEndOfCompleteTextString] method. [#320]
447
- This method allows to retrieve the stack pointer to the last token within a - potentially multi-line - text string.
448
- This method compliments the `TextStrings::getCompleteTextString()` method which will retrieve the contents of the complete text string.
449
- * New [`PHPCSUtils\Utils\TextStrings::getEmbeds()`][TextStrings::getEmbeds] method to retrieve an array with all variables/expressions as embedded in a text string. [#321]
450
- * New [`PHPCSUtils\Utils\TextStrings::stripEmbeds()`][TextStrings::stripEmbeds] method to strip all embedded variables/expressions from a text string. [#321]
451
- * New [`PHPCSUtils\Utils\TextStrings::getStripEmbeds()`][TextStrings::getStripEmbeds] method. [#321]
452
- This method is `public` for those rare cases where both the embeds, as well as the text stripped off embeds, is needed.
453
- * New [`PHPCSUtils\Utils\UseStatements::mergeImportUseStatements()`][UseStatements::mergeImportUseStatements] method. [#196]
454
-
455
- #### Other
456
-
457
- * PHPCSUtils will now cache the results of (potentially) token walking intensive or processing intensive function calls during a run. [#332], [#377]
458
- This should significantly improve performance when multiple sniffs call these functions for the same token during a PHPCS run.
459
- The results of the following functions will now be cached:
460
- - `Arrays::getDoubleArrowPtr()`
461
- - `Arrays::isShortArray()`
462
- - `FunctionDeclarations::getParameters()`
463
- - `Lists::getAssignments()`
464
- - `Lists::isShortList()`
465
- - `Namespaces::findNamespacePtr()`
466
- - `PassedParameters::getParameters()`
467
- - `TextStrings::getEndOfCompleteTextString()`
468
- - `TextStrings::getStripEmbeds()`
469
- - `UseStatements::splitImportUseStatement()`
470
-
471
- ### Changed
472
-
473
- #### PHPCS Backcompat
474
-
475
- * All token array methods in the [`BCTokens`] class are fully up-to-date with the upstream `PHP_CodeSniffer\Util\Tokens` properties as per PHPCS `master` at the time of this release. [#327], [#347], [#360]
476
- * All methods in the [`BCFile`] class are fully up-to-date with the upstream `PHP_CodeSniffer\Files\File` methods as per PHPCS `master` at the time of this release. [#347]
477
- * `BCFile::getMethodParameters()`: forward compatibility with PHPCS 4.x in which closure `use` will be a parenthesis owner. [#251]
478
- * If a non-existent token array is requested from the `BCTokens` class, a `PHPCSUtils\Exceptions\InvalidTokenArray` exception will be thrown. [#344]
479
- The `PHPCSUtils\Exceptions\InvalidTokenArray` exception extends the PHPCS native `PHP_CodeSniffer\Exceptions\RuntimeException`.
480
- Previously, an empty array would be returned.
481
-
482
- #### TestUtils
483
-
484
- * `UtilityMethodTestCase`: all properties contained in the test case class will now always be reset after the tests have run. [#325]
485
- * `UtilityMethodTestCase::getTargetToken()`: when the target token cannot be found, the method will now throw a (catchable) `PHPCSUtils\Exceptions\TestTargetNotFound` exception instead of failing the test. [#248], [#371]
486
- If uncaught, this means that the test will be marked as _errored_ instead of _failed_.
487
- * `UtilityMethodTestCase::getTargetToken()`: this method is now `static`, which allows for it to be used in "set up before class" fixtures. [#382]. [#385]
488
-
489
- #### Tokens
490
-
491
- * `Collections::functionCallTokens()` and `Collections::parameterPassingTokens()`: now include the `T_PARENT` token. [#328]
492
- This accounts for a change in PHPCS 3.7.0 for how `parent` in `new parent` is tokenized.
493
- * If a non-existent token array is requested from the `Collections` class, a `PHPCSUtils\Exceptions\InvalidTokenArray` exception will be thrown. [#349]
494
- The `PHPCSUtils\Exceptions\InvalidTokenArray` exception extends the PHPCS native `PHP_CodeSniffer\Exceptions\RuntimeException`.
495
-
496
- #### Utils
497
-
498
- * `Arrays::isShortArray()`/`Lists::isShortList()`: the underlying logic has been completely refactored for improved accuracy and improved performance. [#392]
499
- * `FunctionDeclarations::getParameters()`: the return array of the method may contain two new keys - `property_visibility` and `visibility_token`. [#169]
500
- These keys will only be included if constructor property promotion is detected.
501
- * `FunctionDeclarations::getParameters()`: forward compatibility with PHPCS 4.x in which closure `use` will be a parenthesis owner. [#251]
502
- * [`GetTokensAsString`]: previously the `tabReplaced()` method was an alias for the `normal()` method. This has now been reversed. [#297]
503
- * `Operators::isReference()`: forward compatibility with PHPCS 4.x in which closure `use` will be a parenthesis owner. [#195]
504
- * [`Parentheses`]: all methods will now recognize `isset()`, `unset()`, `empty()`, `exit()`, `die()` and `eval()` as parentheses owners. [#215]
505
- Note: PHPCS natively does not recognize these constructs as parentheses owners, though this _may_ change in the future. See: [PHPCS#3118]
506
- * [`PassedParameters`]: all methods will now recognize anonymous class instantiations as constructs which can pass parameters. [#234]
507
- * `PassedParameters::getParameters()`: when a named parameter is encountered in a function call, the returned parameter information array for that parameter will now contain the following additional keys: `'name'`, `'name_token'` and the top-level index for the parameter will be set to the parameter `'name'` instead of its position. [#235], [#243], [#383]
508
- The existing `'start'`, `'end'`, `'raw'` and `'clean'` keys will contain the same content as before: the information about the parameter value (excluding the name part).
509
- * `PassedParameters::getParameters()`: new, optional parameter `$limit` to allow for limiting the number of parameters/array items to be parsed. [#261]
510
- This allows for higher efficiency when retrieving the parameters/array entries, especially for large arrays if only the first few entries need to be examined.
511
- Use with care on function calls, as this can break support for named parameters!
512
- * `PassedParameters::getParameters()`: new, optional parameter `$isShortArray` to allow for skipping the "is short array" check for predetermined short arrays. [#269], [#270]
513
- Use judiciously and with extreme care!
514
- * `PassedParameters::getParameter()`: new _semi-optional_ `$paramNames` parameter to allow for retrieving a parameter from a function call using named parameters. [#235]
515
- :warning: This parameter is **_required_** when examining a function call and an exception will be thrown if it was not passed.
516
- This new `$paramNames` parameter allows for passing either the parameter name as a _string_ or as an _array of strings_.
517
- _While a parameter can only have one name, a lot of packages have been, and may still be, reviewing and renaming parameters to more descriptive names to support named parameters in PHP 8.0, so, to allow for supporting multiple versions of packages, different names can be used for the same parameter in a PHP 8.0+ function call and by allowing multiple names to be passed, the method supports this._
518
- * `PassedParameters::getParameter()`: efficiency improvement applicable to function calls not using named parameters and arrays. [#261], [#262]
519
- * `PassedParameters::hasParameters()`: now allows for the `T_PARENT` token for `new parent()` class instantiations. [#328]
520
- This accounts for a change in PHPCS 3.7.0 regarding how `parent` in `new parent` is tokenized.
521
- * `PassedParameters::hasParameters()`: new, optional parameter `$isShortArray` to allow for skipping the "is short array" check for predetermined short arrays. [#269], [#270]
522
- Use judiciously and with extreme care!
523
- * `UseStatements::getType()`: forward compatibility with PHPCS 4.x in which closure `use` will be a parenthesis owner. [#251]
524
-
525
- #### Other
526
-
527
- * The `master` branch has been renamed to `stable`. [#397]
528
- * :warning: All non-`abstract` classes in this package are now `final`. [#376]
529
- * The parameter names in various function declarations have been changed to not intersect with reserved keywords. [#256]
530
- :warning: In the unlikely event an external standard using PHPCSUtils would be using function calls with named parameters, the parameter names will need to be updated to match.
531
- * Composer: The package will now identify itself as a static analysis tool. Thanks [@GaryJones]! [#341]
532
- * Readme/website homepage: the installation instructions have been updated to include information on installing this library and the included [Composer PHPCS plugin] in combination with Composer >= 2.2. [#291], [#292]
533
- * Various documentation improvements. [#216], [#309], [#394], [#395], [#396], [#398]
534
- * Various housekeeping and CI maintenance.
535
- Amongst other things, CI is now run via GitHub Actions ([#239]), the PHPCSUtils native tests now use the [PHPUnit Polyfills] package ([#277]) and the tests are now run against PHP 5.4 - 8.2.
536
-
537
- ### Deprecated
538
-
539
- :warning: Everything which has currently been deprecated, will be removed before the final `1.0.0` version of PHPCSUtils is tagged.
540
-
541
- #### Tokens
542
-
543
- [`Collections`] class: direct access to the properties in the class is now deprecated for forward-compatibility reasons.
544
- All properties have a replacement which should be used instead, in most cases this will be a method with the same name as the previously used property,
545
-
546
- | Deprecated | Replacement | PR | Remarks |
547
- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -------------- | ---------------------------------------- |
548
- | `Collections::$alternativeControlStructureSyntaxTokens` | `Collections::alternativeControlStructureSyntaxes()` | [#311] | Mind the change in the name! |
549
- | `Collections::$alternativeControlStructureSyntaxCloserTokens` | `Collections::alternativeControlStructureSyntaxClosers()` | [#311] | Mind the change in the name! |
550
- | `Collections::$arrayTokens` | `Collections::arrayTokens()` | [#311] | |
551
- | `Collections::$arrayTokensBC` | `Collections::arrayTokensBC()` | [#311] | |
552
- | `Collections::$classModifierKeywords` | `Collections::classModifierKeywords()` | [#311] | |
553
- | `Collections::$closedScopes` | `Collections::closedScopes()` | [#311] | |
554
- | `Collections::$controlStructureTokens` | `Collections::controlStructureTokens()` | [#311] | |
555
- | `Collections::$incrementDecrementOperators` | `Collections::incrementDecrementOperators()` | [#311] | |
556
- | `Collections::$listTokens` | `Collections::listTokens()` | [#311] | |
557
- | `Collections::$listTokensBC` | `Collections::listTokensBC()` | [#311] | |
558
- | `Collections::$magicConstants` | `PHPCSUtils\BackCompat\BCTokens::magicConstants()` or `PHP_CodeSniffer\Util\Tokens::$magicConstants` | [#311] | |
559
- | `Collections::$namespaceDeclarationClosers` | `Collections::namespaceDeclarationClosers()` | [#311] | |
560
- | `Collections::$objectOperators` | `Collections::objectOperators()` | [#176] | |
561
- | `Collections::$OOCanImplement` | `Collections::ooCanImplement()` | [#311] | Mind the case change in the `oo` prefix! |
562
- | `Collections::$OOCanExtend` | `Collections::ooCanExtend()` | [#311] | Mind the case change in the `oo` prefix! |
563
- | `Collections::$OOConstantScopes` | `Collections::ooConstantScopes()` | [#311] | Mind the case change in the `oo` prefix! |
564
- | `Collections::$OOPropertyScopes` | `Collections::ooPropertyScopes()` | [#311] | Mind the case change in the `oo` prefix! |
565
- | `Collections::$OOHierarchyKeywords` | `Collections::ooHierarchyKeywords()` | [#311] | Mind the case change in the `oo` prefix! |
566
- | `Collections::$OONameTokens` | `Collections::namespacedNameTokens()` | [#202] | Mind the change name! |
567
- | `Collections::$parameterTypeTokens` | `Collections::parameterTypeTokens()` | [#168] | |
568
- | `Collections::$propertyModifierKeywords` | `Collections::propertyModifierKeywords()` | [#311] | |
569
- | `Collections::$propertyTypeTokens` | `Collections::propertyTypeTokens()` | [#168] | |
570
- | `Collections::$returnTypeTokens` | `Collections::returnTypeTokens()` | [#168] | |
571
- | `Collections::$shortArrayTokens` | `Collections::shortArrayTokens()` | [#311] | |
572
- | `Collections::$shortArrayTokensBC` | `Collections::shortArrayTokensBC()` | [#311] | |
573
- | `Collections::$shortListTokens` | `Collections::shortListTokens()` | [#311] | |
574
- | `Collections::$shortListTokensBC` | `Collections::shortListTokensBC()` | [#311] | |
575
- | `Collections::$textStingStartTokens` | `Collections::textStringStartTokens()` | [#311], [#319] | Mind the fixed typo in the name! |
576
-
577
- Additionally, the following methods in the `Collections` class have been deprecated:
578
-
579
- | Deprecated | Replacement | PR |
580
- | -------------------------------------------- | ------------------------------------------ | ------ |
581
- | `Collections::arrowFunctionTokensBC()` | Use the `T_FN` token instead. | [#347] |
582
- | `Collections::functionDeclarationTokensBC()` | `Collections::functionDeclarationTokens()` | [#347] |
583
- | `Collections::parameterTypeTokensBC()` | `Collections::parameterTypeTokens()` | [#347] |
584
- | `Collections::propertyTypeTokensBC()` | `Collections::propertyTypeTokens()` | [#347] |
585
- | `Collections::returnTypeTokensBC()` | `Collections::returnTypeTokens()` | [#347] |
586
-
587
- #### Utils
588
-
589
- * `ControlStructures::getDeclareScopeOpenClose()`: this method is no longer needed, check the `scope_opener`/`scope_closer` on the `T_DECLARE` token instead. [#347]
590
- * `FunctionDeclarations::getArrowFunctionOpenClose()`: this method is no longer needed, check the `scope_opener`/`scope_closer` etc on the `T_FN` token instead. [#347]
591
- * `FunctionDeclarations::isArrowFunction()`: this method is no longer needed, use the `T_FN` token instead. [#347]
592
-
593
- #### Other
594
-
595
- * The `PHPCS23Utils` standard, which is no longer needed now support for PHPCS < 3.7.1 has been dropped. [#347]
596
-
597
- ### Removed
598
-
599
- * Support for PHPCS < 3.7.1. [#347]
600
-
601
- #### Utils
602
-
603
- * The following constants, which were only intended for internal use, have been removed: [#347]
604
- - `PHPCSUtils\Utils\Numbers::REGEX_NUMLIT_STRING`
605
- - `PHPCSUtils\Utils\Numbers::REGEX_HEX_NUMLIT_STRING`
606
- - `PHPCSUtils\Utils\Numbers::UNSUPPORTED_PHPCS_VERSION`
607
-
608
- ### Fixed
609
-
610
- #### Abstract Sniffs
611
-
612
- * `AbstractArrayDeclarationSniff::getActualArrayKey()`: will now handle escaped vars in heredoc array keys better. [#379]
613
-
614
- #### Fixers
615
-
616
- * [`SpacesFixer`]: in a specific new line vs trailing comment situation, the fixer would incorrectly add a stray new line. [#229]
617
-
618
- #### TestUtils
619
-
620
- * `UtilityMethodTestCase::getTargetToken()`: will now throw a `PHPCSUtils\Exceptions\TestMarkerNotFound` exception if the provided test marker comment is not found. [#273], [#372]
621
- This prevents the method potentially misidentifying the target token.
622
-
623
- #### Tokens
624
-
625
- * `Collections::parameterTypeTokens()`, `Collections::propertyTypeTokens()` and `Collections::returnTypeTokens()`: include the `namespace` keyword for namespace relative identifier names. [#180]
626
-
627
- #### Utils
628
-
629
- * `Arrays::isShortArray()`/`Lists::isShortList()`: fixed a number of bugs which previously resulted in an incorrect short list/short array determination. [#392]
630
- * `FunctionDeclarations::getParameters()`: will now correctly recognize namespace relative names when used in a parameter type. [#180]
631
- * `FunctionDeclarations::getProperties()`: will now correctly recognize namespace relative names when used in the return type. [#180]
632
- * `ObjectDeclarations::findExtendedClassName()`: will now correctly recognize namespace relative names when used as the _extended_ parent class name. [#181]
633
- * `ObjectDeclarations::findExtendedInterfaceNames()`: will now correctly recognize namespace relative names when used in _extended_ interface names. [#181]
634
- * `ObjectDeclarations::findImplementedInterfaceNames()`: will now correctly recognize namespace relative names when used in _implemented_ interface names. [#181]
635
- * `ObjectDeclarations::getClassProperties()`: will now correctly handle classes declared with both the `final` as well as the `abstract` keyword. [#252]
636
- * `Operators::isReference()`: if one parameter in a function declaration was passed by reference, then all `T_BITWISE_AND` (not intersection type `&`'s) tokens would be regarded as references. [#188]
637
- * `Operators::isReference()`: the `&` would not be recognized as a reference for arrow function parameters passed by reference. [#192]
638
- * `Operators::isUnaryPlusMinus()`: a preceding `exit`, `break`, `continue` or arrow function `=>` is now recognized as an indicator that a plus/minus sign is unary. [#187], [#197]
639
- * `Variables::getMemberProperties()`: will now correctly recognize namespace relative names when used in a property type. [#180]
640
-
641
- [UtilityMethodTestCase::usesPhp8NameTokens]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-TestUtils-UtilityMethodTestCase.html#method_usesPhp8NameTokens
642
- [PassedParameters::getParameterFromStack]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-PassedParameters.html#method_getParameterFromStack
643
- [TextStrings::getEndOfCompleteTextString]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-TextStrings.html#method_getEndOfCompleteTextString
644
- [TextStrings::getEmbeds]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-TextStrings.html#method_getEmbeds
645
- [TextStrings::getStripEmbeds]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-TextStrings.html#method_getStripEmbeds
646
- [TextStrings::stripEmbeds]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-TextStrings.html#method_stripEmbeds
647
- [UseStatements::mergeImportUseStatements]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-UseStatements.html#method_mergeImportUseStatements
648
-
649
- [#163]: https://github.com/PHPCSStandards/PHPCSUtils/pull/163
650
- [#168]: https://github.com/PHPCSStandards/PHPCSUtils/pull/168
651
- [#169]: https://github.com/PHPCSStandards/PHPCSUtils/pull/169
652
- [#172]: https://github.com/PHPCSStandards/PHPCSUtils/pull/172
653
- [#176]: https://github.com/PHPCSStandards/PHPCSUtils/pull/176
654
- [#180]: https://github.com/PHPCSStandards/PHPCSUtils/pull/180
655
- [#181]: https://github.com/PHPCSStandards/PHPCSUtils/pull/181
656
- [#183]: https://github.com/PHPCSStandards/PHPCSUtils/pull/183
657
- [#187]: https://github.com/PHPCSStandards/PHPCSUtils/pull/187
658
- [#188]: https://github.com/PHPCSStandards/PHPCSUtils/pull/188
659
- [#192]: https://github.com/PHPCSStandards/PHPCSUtils/pull/192
660
- [#195]: https://github.com/PHPCSStandards/PHPCSUtils/pull/195
661
- [#196]: https://github.com/PHPCSStandards/PHPCSUtils/pull/196
662
- [#197]: https://github.com/PHPCSStandards/PHPCSUtils/pull/197
663
- [#200]: https://github.com/PHPCSStandards/PHPCSUtils/pull/200
664
- [#202]: https://github.com/PHPCSStandards/PHPCSUtils/pull/202
665
- [#204]: https://github.com/PHPCSStandards/PHPCSUtils/pull/204
666
- [#205]: https://github.com/PHPCSStandards/PHPCSUtils/pull/205
667
- [#206]: https://github.com/PHPCSStandards/PHPCSUtils/pull/206
668
- [#207]: https://github.com/PHPCSStandards/PHPCSUtils/pull/207
669
- [#208]: https://github.com/PHPCSStandards/PHPCSUtils/pull/208
670
- [#209]: https://github.com/PHPCSStandards/PHPCSUtils/pull/209
671
- [#210]: https://github.com/PHPCSStandards/PHPCSUtils/pull/210
672
- [#211]: https://github.com/PHPCSStandards/PHPCSUtils/pull/211
673
- [#212]: https://github.com/PHPCSStandards/PHPCSUtils/pull/212
674
- [#213]: https://github.com/PHPCSStandards/PHPCSUtils/pull/213
675
- [#215]: https://github.com/PHPCSStandards/PHPCSUtils/pull/215
676
- [#216]: https://github.com/PHPCSStandards/PHPCSUtils/pull/216
677
- [#217]: https://github.com/PHPCSStandards/PHPCSUtils/pull/217
678
- [#219]: https://github.com/PHPCSStandards/PHPCSUtils/pull/219
679
- [#225]: https://github.com/PHPCSStandards/PHPCSUtils/pull/225
680
- [#226]: https://github.com/PHPCSStandards/PHPCSUtils/pull/226
681
- [#229]: https://github.com/PHPCSStandards/PHPCSUtils/pull/229
682
- [#233]: https://github.com/PHPCSStandards/PHPCSUtils/pull/233
683
- [#234]: https://github.com/PHPCSStandards/PHPCSUtils/pull/234
684
- [#235]: https://github.com/PHPCSStandards/PHPCSUtils/pull/235
685
- [#237]: https://github.com/PHPCSStandards/PHPCSUtils/pull/237
686
- [#239]: https://github.com/PHPCSStandards/PHPCSUtils/pull/239
687
- [#241]: https://github.com/PHPCSStandards/PHPCSUtils/pull/241
688
- [#243]: https://github.com/PHPCSStandards/PHPCSUtils/pull/243
689
- [#247]: https://github.com/PHPCSStandards/PHPCSUtils/pull/247
690
- [#248]: https://github.com/PHPCSStandards/PHPCSUtils/pull/248
691
- [#249]: https://github.com/PHPCSStandards/PHPCSUtils/pull/249
692
- [#251]: https://github.com/PHPCSStandards/PHPCSUtils/pull/251
693
- [#252]: https://github.com/PHPCSStandards/PHPCSUtils/pull/252
694
- [#254]: https://github.com/PHPCSStandards/PHPCSUtils/pull/254
695
- [#256]: https://github.com/PHPCSStandards/PHPCSUtils/pull/256
696
- [#261]: https://github.com/PHPCSStandards/PHPCSUtils/pull/261
697
- [#262]: https://github.com/PHPCSStandards/PHPCSUtils/pull/262
698
- [#269]: https://github.com/PHPCSStandards/PHPCSUtils/pull/269
699
- [#270]: https://github.com/PHPCSStandards/PHPCSUtils/pull/270
700
- [#273]: https://github.com/PHPCSStandards/PHPCSUtils/pull/273
701
- [#277]: https://github.com/PHPCSStandards/PHPCSUtils/pull/277
702
- [#285]: https://github.com/PHPCSStandards/PHPCSUtils/pull/285
703
- [#291]: https://github.com/PHPCSStandards/PHPCSUtils/pull/291
704
- [#292]: https://github.com/PHPCSStandards/PHPCSUtils/pull/292
705
- [#293]: https://github.com/PHPCSStandards/PHPCSUtils/pull/293
706
- [#297]: https://github.com/PHPCSStandards/PHPCSUtils/pull/297
707
- [#304]: https://github.com/PHPCSStandards/PHPCSUtils/pull/304
708
- [#309]: https://github.com/PHPCSStandards/PHPCSUtils/pull/309
709
- [#311]: https://github.com/PHPCSStandards/PHPCSUtils/pull/311
710
- [#319]: https://github.com/PHPCSStandards/PHPCSUtils/pull/319
711
- [#320]: https://github.com/PHPCSStandards/PHPCSUtils/pull/320
712
- [#321]: https://github.com/PHPCSStandards/PHPCSUtils/pull/321
713
- [#325]: https://github.com/PHPCSStandards/PHPCSUtils/pull/325
714
- [#327]: https://github.com/PHPCSStandards/PHPCSUtils/pull/327
715
- [#328]: https://github.com/PHPCSStandards/PHPCSUtils/pull/328
716
- [#332]: https://github.com/PHPCSStandards/PHPCSUtils/pull/332
717
- [#335]: https://github.com/PHPCSStandards/PHPCSUtils/pull/335
718
- [#341]: https://github.com/PHPCSStandards/PHPCSUtils/pull/341
719
- [#344]: https://github.com/PHPCSStandards/PHPCSUtils/pull/344
720
- [#347]: https://github.com/PHPCSStandards/PHPCSUtils/pull/347
721
- [#349]: https://github.com/PHPCSStandards/PHPCSUtils/pull/349
722
- [#356]: https://github.com/PHPCSStandards/PHPCSUtils/pull/356
723
- [#357]: https://github.com/PHPCSStandards/PHPCSUtils/pull/357
724
- [#358]: https://github.com/PHPCSStandards/PHPCSUtils/pull/358
725
- [#360]: https://github.com/PHPCSStandards/PHPCSUtils/pull/360
726
- [#362]: https://github.com/PHPCSStandards/PHPCSUtils/pull/362
727
- [#363]: https://github.com/PHPCSStandards/PHPCSUtils/pull/363
728
- [#365]: https://github.com/PHPCSStandards/PHPCSUtils/pull/365
729
- [#366]: https://github.com/PHPCSStandards/PHPCSUtils/pull/366
730
- [#367]: https://github.com/PHPCSStandards/PHPCSUtils/pull/367
731
- [#368]: https://github.com/PHPCSStandards/PHPCSUtils/pull/368
732
- [#371]: https://github.com/PHPCSStandards/PHPCSUtils/pull/371
733
- [#372]: https://github.com/PHPCSStandards/PHPCSUtils/pull/372
734
- [#376]: https://github.com/PHPCSStandards/PHPCSUtils/pull/376
735
- [#377]: https://github.com/PHPCSStandards/PHPCSUtils/pull/377
736
- [#379]: https://github.com/PHPCSStandards/PHPCSUtils/pull/379
737
- [#381]: https://github.com/PHPCSStandards/PHPCSUtils/pull/381
738
- [#382]: https://github.com/PHPCSStandards/PHPCSUtils/pull/382
739
- [#383]: https://github.com/PHPCSStandards/PHPCSUtils/pull/383
740
- [#385]: https://github.com/PHPCSStandards/PHPCSUtils/pull/385
741
- [#390]: https://github.com/PHPCSStandards/PHPCSUtils/pull/390
742
- [#391]: https://github.com/PHPCSStandards/PHPCSUtils/pull/391
743
- [#392]: https://github.com/PHPCSStandards/PHPCSUtils/pull/392
744
- [#394]: https://github.com/PHPCSStandards/PHPCSUtils/pull/394
745
- [#395]: https://github.com/PHPCSStandards/PHPCSUtils/pull/395
746
- [#396]: https://github.com/PHPCSStandards/PHPCSUtils/pull/396
747
- [#397]: https://github.com/PHPCSStandards/PHPCSUtils/pull/397
748
- [#398]: https://github.com/PHPCSStandards/PHPCSUtils/pull/398
749
-
750
- [PHPCS#3118]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3118
751
- [PHPUnit Polyfills]: https://github.com/Yoast/PHPUnit-Polyfills
752
-
753
-
754
- ## [1.0.0-alpha3] - 2020-06-29
755
-
756
- Notes:
757
-
758
- * While still in alpha, some BC-breaks may be introduced. These are clearly indicated in the changelog with the :warning: symbol.
759
- * Until PHPCS 4.x has been released, PHPCSUtils does not formally support it, though an effort is made to keep up with the changes and anticipate potential compatibility issues.
760
- For testing purposes, the composer configuration allows for PHPCSUtils to be installed with PHPCS 4.x.
761
- * Until PHP 8.0 has been released, PHPCSUtils does not formally support it, though an effort is made to keep up with the changes and anticipate potential compatibility issues.
762
- For testing purposes, the composer configuration allows for PHPCSUtils to be installed with PHP 8.
763
-
764
- ### Added
765
-
766
- * New [`PHPCSUtils\Utils\NamingConventions`][`NamingConventions`] class: Utility functions for working with identifier names (namespace names, class/trait/interface names, function names, variable and constant names). [#119]
767
- * New [`PHPCSUtils\BackCompat\Helper::getEncoding()`][Helper::getEncoding] method. [#118]
768
- * New [`PHPCSUtils\Utils\ControlStructures::getCaughtExceptions()`][ControlStructures::getCaughtExceptions] method. [#114], [#138]
769
- * New [`PHPCSUtils\Utils\UseStatements::splitAndMergeImportUseStatement()`][UseStatements::splitAndMergeImportUseStatement] method. [#117]
770
-
771
- #### PHPCS BackCompat
772
-
773
- * `BCFile::getMethodProperties()`: support for "static" as a return type (PHP 8.0). [#134], [PHPCS#2952]
774
-
775
- #### TestUtils
776
-
777
- * [`UtilityMethodTestCase`]: new public `$phpcsVersion` property for use in tests. [#107]
778
- **Note**: if the PHPCS version is needed within a data provider method for a test, `Helper::getVersion()` still needs to be used as the data providers are run before the `setUpBeforeClass()`-like methods which set the property.
779
-
780
- #### Tokens
781
-
782
- * New [`Collections::$incrementDecrementOperators`][`Collections`] property. [#130]
783
- * New [`Collections::$magicConstants`][`Collections`] property. [#106]
784
- * New [`Collections::$objectOperators`][`Collections`] property. [#130]
785
- * New [`Collections::$OOHierarchyKeywords`][`Collections`] property representing the keywords to access properties or methods from inside a class definition, i.e `self`, `parent` and `static`. [#115]
786
- * New [`Collections::$OONameTokens`][`Collections`] property containing tokens which can be part of a partially/fully qualified name when used in inline code. [#113]
787
- * New [`Collections::functionDeclarationTokens()`][`Collections`] method to retrieve the tokens which represent a keyword starting a function declaration. [#133]
788
- This method is compatible with PHPCS 3.5.3 and higher.
789
- * New [`Collections::functionDeclarationTokensBC()`][`Collections`] method to retrieve the tokens which represent a keyword starting a function declaration (cross-version compatible). [#133]
790
- This method is compatible with PHPCS 2.6.0 and higher.
791
- * New [`Collections::parameterTypeTokensBC()`][`Collections`] method to retrieve the tokens which need to be recognized for parameter types cross-version. [#109]
792
- Use this method when the implementing standard needs to support PHPCS < 3.3.0.
793
- * New [`Collections::propertyTypeTokensBC()`][`Collections`] method to retrieve the tokens which need to be recognized for property types cross-version. [#109]
794
- Use this method when the implementing standard needs to support PHPCS < 3.3.0.
795
- * New [`Collections::returnTypeTokensBC()`][`Collections`] method to retrieve the tokens which need to be recognized for return types cross-version. [#109]
796
- Use this method when the implementing standard needs to support PHPCS < 3.5.4.
797
- * `Collections::$returnTypeTokens`: support for "static" as a return type (PHP 8.0). [#134]
798
-
799
- #### Utils
800
-
801
- * `FunctionDeclarations::getProperties()`: support for "static" as a return type (PHP 8.0). [#134]
802
-
803
- ### Changed
804
-
805
- #### PHPCS BackCompat
806
-
807
- * `BCFile::getDeclarationName()`: has been made compatible with PHPCS 4.x. [#110]
808
- * `BCFile::getMethodProperties()`: has been made compatible with PHPCS 4.x. [#109]
809
- * `BCFile::getMemberProperties()`: has been made compatible with PHPCS 4.x. [#109]
810
- * `BCTokens`: :warning: The visibility of the `BCTokens::$phpcsCommentTokensTypes`, `BCTokens::$ooScopeTokens`, `BCTokens::$textStringTokens` properties has changed from `protected` to `private`. [#139]
811
- * `Helper::setConfigData()`: has been made compatible with PHPCS 4.x. [#137]
812
- A new `$config` parameter has been added to the method. This parameter is a required parameter when the method is used with PHPCS 4.x.
813
-
814
- #### TestUtils
815
-
816
- * [`UtilityMethodTestCase`]: tests for JS/CSS will now automatically be skipped when run in combination with PHPCS 4.x (which drops JS/CSS support). [#111]
817
- * Confirmed that the currently available test utils are compatible with PHPUnit 9.x. [#103]
818
-
819
- #### Tokens
820
-
821
- * `Collections::$parameterTypeTokens`: has been made compatible with PHPCS 4.x. [#109]
822
- :warning: This removes support for PHPCS < 3.3.0 from the property. Use the [`Collections::parameterTypeTokensBC()`][`Collections`] method instead if PHPCS < 3.3.0 needs to be supported.
823
- * `Collections::$propertyTypeTokens`: has been made compatible with PHPCS 4.x. [#109]
824
- :warning: This removes support for PHPCS < 3.3.0 from the property. Use the [`Collections::propertyTypeTokensBC()`][`Collections`] method instead if PHPCS < 3.3.0 needs to be supported.
825
- * `Collections::$returnTypeTokens`: has been made compatible with PHPCS 4.x. [#109]
826
- :warning: This removes support for PHPCS < 3.5.4 from the property. Use the [`Collections::returnTypeTokensBC()`][`Collections`] method instead if PHPCS < 3.5.4 needs to be supported.
827
-
828
- #### Utils
829
-
830
- * `FunctionDeclarations::getArrowFunctionOpenClose()`: has been made compatible with PHPCS 4.x. [#109]
831
- * `FunctionDeclarations::getProperties()`: has been made compatible with PHPCS 4.x. [#109]
832
- * :warning: `Lists::getAssignments()`: the return value of the method has been consolidated to be less fiddly to work with. [#129]
833
- - :warning: The `nested_list` index key in the return value has been renamed to `is_nested_list`.
834
- * `ObjectDeclarations::getName()`: has been made compatible with PHPCS 4.x. [#110]
835
- * `Variables::getMemberProperties()`: has been made compatible with PHPCS 4.x. [#109]
836
-
837
- #### Other
838
-
839
- * Composer: PHPCSUtils can now be installed in combination with PHPCS `4.0.x-dev@dev` for testing purposes.
840
- * Composer: The version requirements for the [Composer PHPCS plugin] have been widened to allow for version 0.7.0 which supports Composer 2.0.0.
841
- * Readme/website homepage: textual improvements. Props [@GaryJones]. [#121]
842
- * Readme/website homepage: added additional FAQ question & answers. [#157]
843
- * The website homepage is now generated using the GitHub Pages gem with Jekyll, making maintenance easier. [#141]
844
- * Significant improvements to the docblock documentation and by extension the [generated API documentation]. [#145], [#146], [#147], [#148], [#149], [#150], [#151], [#152], [#153], [#154], [#155], [#156]
845
- * Various housekeeping.
846
-
847
- ### Fixed
848
-
849
- #### Abstract Sniffs
850
-
851
- * `AbstractArrayDeclarationSniff`: improved parse error handling. [#99]
852
-
853
- #### PHPCS BackCompat
854
-
855
- * `BCFile::findEndOfStatement()`: now supports arrow functions when used as a function argument, in line with the same change made in PHPCS 3.5.5. [#143]
856
- * `BcFile::isReference()`: bug fix, the reference operator was not recognized as such for closures declared to return by reference. [#160], [PHPCS#2977]
857
-
858
- #### Utils
859
-
860
- * `FunctionDeclarations::getArrowFunctionOpenClose()`: now supports arrow functions when used as a function argument, in line with the same change made in PHPCS 3.5.5. [#143]
861
- * `FunctionDeclarations::getArrowFunctionOpenClose()`: now supports for arrow functions returning heredoc/nowdocs, in line with the same change made in PHPCS `master` and expected to be released in PHPCS 3.5.6. [#143]
862
- * `FunctionDeclarations::getName()`: bug fix for functions declared to return by reference. [#131]
863
- * `FunctionDeclarations::isMagicFunction()`: bug fix for nested functions. [#127]
864
- * `Operators::isReference()`: bug fix, the reference operator was not recognized as such for closures declared to return by reference. [#142]
865
- * `Namespaces::getType()`: improved type detection for when the `namespace` keyword is used as an operator in the global namespace. [#132]
866
- * `TextStrings::getCompleteTextString()`: will now remove the newline at the end of a heredoc/nowdoc. [#136]
867
- PHP itself does not include the last new line in a heredoc/nowdoc text string when handling it, so the method shouldn't either.
868
-
869
- [generated API documentation]: https://phpcsutils.com/phpdoc/
870
- [Helper::getEncoding]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-BackCompat-Helper.html#method_getEncoding
871
- [ControlStructures::getCaughtExceptions]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-ControlStructures.html#method_getCaughtExceptions
872
- [UseStatements::splitAndMergeImportUseStatement]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-UseStatements.html#method_splitAndMergeImportUseStatement
873
-
874
- [#99]: https://github.com/PHPCSStandards/PHPCSUtils/pull/99
875
- [#103]: https://github.com/PHPCSStandards/PHPCSUtils/pull/103
876
- [#106]: https://github.com/PHPCSStandards/PHPCSUtils/pull/106
877
- [#107]: https://github.com/PHPCSStandards/PHPCSUtils/pull/107
878
- [#109]: https://github.com/PHPCSStandards/PHPCSUtils/pull/109
879
- [#110]: https://github.com/PHPCSStandards/PHPCSUtils/pull/110
880
- [#111]: https://github.com/PHPCSStandards/PHPCSUtils/pull/111
881
- [#113]: https://github.com/PHPCSStandards/PHPCSUtils/pull/113
882
- [#114]: https://github.com/PHPCSStandards/PHPCSUtils/pull/114
883
- [#115]: https://github.com/PHPCSStandards/PHPCSUtils/pull/115
884
- [#117]: https://github.com/PHPCSStandards/PHPCSUtils/pull/117
885
- [#118]: https://github.com/PHPCSStandards/PHPCSUtils/pull/118
886
- [#119]: https://github.com/PHPCSStandards/PHPCSUtils/pull/119
887
- [#129]: https://github.com/PHPCSStandards/PHPCSUtils/pull/129
888
- [#121]: https://github.com/PHPCSStandards/PHPCSUtils/pull/121
889
- [#127]: https://github.com/PHPCSStandards/PHPCSUtils/pull/127
890
- [#130]: https://github.com/PHPCSStandards/PHPCSUtils/pull/130
891
- [#131]: https://github.com/PHPCSStandards/PHPCSUtils/pull/131
892
- [#132]: https://github.com/PHPCSStandards/PHPCSUtils/pull/132
893
- [#133]: https://github.com/PHPCSStandards/PHPCSUtils/pull/133
894
- [#134]: https://github.com/PHPCSStandards/PHPCSUtils/pull/134
895
- [#136]: https://github.com/PHPCSStandards/PHPCSUtils/pull/136
896
- [#137]: https://github.com/PHPCSStandards/PHPCSUtils/pull/137
897
- [#138]: https://github.com/PHPCSStandards/PHPCSUtils/pull/138
898
- [#139]: https://github.com/PHPCSStandards/PHPCSUtils/pull/139
899
- [#141]: https://github.com/PHPCSStandards/PHPCSUtils/pull/141
900
- [#142]: https://github.com/PHPCSStandards/PHPCSUtils/pull/142
901
- [#143]: https://github.com/PHPCSStandards/PHPCSUtils/pull/143
902
- [#145]: https://github.com/PHPCSStandards/PHPCSUtils/pull/145
903
- [#146]: https://github.com/PHPCSStandards/PHPCSUtils/pull/146
904
- [#147]: https://github.com/PHPCSStandards/PHPCSUtils/pull/147
905
- [#148]: https://github.com/PHPCSStandards/PHPCSUtils/pull/148
906
- [#149]: https://github.com/PHPCSStandards/PHPCSUtils/pull/149
907
- [#150]: https://github.com/PHPCSStandards/PHPCSUtils/pull/150
908
- [#151]: https://github.com/PHPCSStandards/PHPCSUtils/pull/151
909
- [#152]: https://github.com/PHPCSStandards/PHPCSUtils/pull/152
910
- [#153]: https://github.com/PHPCSStandards/PHPCSUtils/pull/153
911
- [#154]: https://github.com/PHPCSStandards/PHPCSUtils/pull/154
912
- [#155]: https://github.com/PHPCSStandards/PHPCSUtils/pull/155
913
- [#156]: https://github.com/PHPCSStandards/PHPCSUtils/pull/156
914
- [#157]: https://github.com/PHPCSStandards/PHPCSUtils/pull/157
915
- [#160]: https://github.com/PHPCSStandards/PHPCSUtils/pull/160
916
- [PHPCS#2952]: https://github.com/squizlabs/PHP_CodeSniffer/pull/2952
917
- [PHPCS#2977]: https://github.com/squizlabs/PHP_CodeSniffer/pull/2977
918
-
919
-
920
- ## [1.0.0-alpha2] - 2020-02-16
921
-
922
- Note:
923
-
924
- * While still in alpha, some BC-breaks may be introduced. These are clearly indicated in the changelog with the :warning: symbol.
925
-
926
- ### Added
927
-
928
- * New [`PHPCSUtils\Utils\ControlStructures`][`ControlStructures`] class: Utility functions for use when examining control structures. [#70]
929
- * New [`PHPCSUtils\Utils\FunctionDeclarations::isArrowFunction()`][FunctionDeclarations::isArrowFunction] method. [#77], [#79]
930
- * New [`PHPCSUtils\Utils\FunctionDeclarations::getArrowFunctionOpenClose()`][FunctionDeclarations::getArrowFunctionOpenClose] method. [#77], [#79]
931
-
932
- #### PHPCS BackCompat
933
-
934
- * `BCFile::isReference()`: support for arrow functions returning by reference. [#77]
935
- * `BCFile::getMethodParameters()`: support for arrow functions. [#77], [#79]
936
- * `BCFile::getMethodProperties()`: support for arrow functions. [#77], [#79], [#89]
937
- * `BCFile::getDeclarationName()`: allow functions to be called "fn". [#77]
938
- * `BCFile::findEndOfStatement()`: support for arrow functions. [#77], [#79]
939
- * `BCFile::findStartOfStatement()`: support for arrow functions. [#77]
940
-
941
- #### Tokens
942
-
943
- * New [`Collections::$alternativeControlStructureSyntaxTokens`][`Collections`] property. [#70]
944
- * New [`Collections::$alternativeControlStructureSyntaxCloserTokens`][`Collections`] property. [#68], [#69]
945
- * New [`Collections::$controlStructureTokens`][`Collections`] property. [#70]
946
- * New [`Collections::arrowFunctionTokensBC()`][`Collections`] method. [#79]
947
-
948
- #### Utils
949
-
950
- * `Arrays::getDoubleArrowPtr()`: support for arrow functions. [#77], [#79], [#84]
951
- * `FunctionDeclarations::getParameters()`: support for arrow functions. [#77], [#79]
952
- * `FunctionDeclarations::getProperties()`: support for arrow functions. [#77], [#79]
953
- * `Operators::isReference()`: support for arrow functions returning by reference. [#77]
954
- * `Parentheses::getOwner()`: support for arrow functions. [#77]
955
- * `Parentheses::isOwnerIn()`: support for arrow functions. [#77], [#79]
956
-
957
- #### Other
958
-
959
- * Documentation website at <https://phpcsutils.com/>
960
-
961
- ### Changed
962
-
963
- #### PHPCS BackCompat
964
-
965
- * `BCFile::getCondition()`: sync with PHPCS 3.5.4 - added support for new `$first` parameter. [#73]
966
-
967
- #### Tokens
968
-
969
- * The `Collections::$returnTypeTokens` property now includes `T_ARRAY` to allow for supporting arrow functions in PHPCS < 3.5.3. [#77]
970
-
971
- #### Utils
972
-
973
- * :warning: `Conditions::getCondition()`: sync with PHPCS 3.5.4 - renamed the existing `$reverse` parameter to `$first` and reversing the meaning of the boolean values, to stay in line with PHPCS itself. [#73]
974
- * :warning: `Numbers`: the `$unsupportedPHPCSVersions` property has been replaced with an `UNSUPPORTED_PHPCS_VERSION` constant. [#88]
975
-
976
- #### Other
977
-
978
- * Various housekeeping.
979
-
980
- [FunctionDeclarations::isArrowFunction]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-FunctionDeclarations.html#method_isArrowFunction
981
- [FunctionDeclarations::getArrowFunctionOpenClose]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-FunctionDeclarations.html#method_getArrowFunctionOpenClose
982
-
983
- [#68]: https://github.com/PHPCSStandards/PHPCSUtils/pull/68
984
- [#69]: https://github.com/PHPCSStandards/PHPCSUtils/pull/69
985
- [#70]: https://github.com/PHPCSStandards/PHPCSUtils/pull/70
986
- [#73]: https://github.com/PHPCSStandards/PHPCSUtils/pull/73
987
- [#77]: https://github.com/PHPCSStandards/PHPCSUtils/pull/77
988
- [#79]: https://github.com/PHPCSStandards/PHPCSUtils/pull/79
989
- [#84]: https://github.com/PHPCSStandards/PHPCSUtils/pull/84
990
- [#88]: https://github.com/PHPCSStandards/PHPCSUtils/pull/88
991
- [#89]: https://github.com/PHPCSStandards/PHPCSUtils/pull/89
992
-
993
-
994
- ## 1.0.0-alpha1 - 2020-01-23
995
-
996
- Initial alpha release containing:
997
-
998
- * A `PHPCS23Utils` standard which can be used to allow an external PHPCS standard to be compatible with both PHPCS 2.x as well as 3.x.
999
- * A `PHPCSUtils` standard which contains generic utilities which can be used when writing sniffs.
1000
- **_This standard does not contain any sniffs!_**
1001
- To use these utilities in PHPCS 3.x, all that is needed is for this package to be installed and registered with PHPCS using `installed_paths`. If the package is requested via Composer, this will automatically be handled by the [Composer PHPCS plugin].
1002
- To use these utilities in PHPCS 2.x, make sure the external standard includes the `PHPCS23Utils` standard in the `ruleset.xml` file like so: `<rule ref="PHPCS23Utils"/>`.
1003
-
1004
- All utilities offered are compatible with PHP_CodeSniffer 2.6.0 up to the latest stable release.
1005
-
1006
- This initial alpha release contains the following utility classes:
1007
-
1008
- ### Abstract Sniffs
1009
-
1010
- * [`AbstractArrayDeclarationSniff`]: to examine array declarations.
1011
-
1012
- ### BackCompat
1013
-
1014
- * [`BCFile`]: Backport of the latest versions of PHPCS native utility functions from the `PHP_CodeSniffer\Files\File` class to make them available in older PHPCS versions without the bugs and other quirks that the older versions of the native functions had.
1015
- * [`BCTokens`]: Backport of the latest versions of PHPCS native token arrays from the `PHP_CodeSniffer\Util\Tokens` class to make them available in older PHPCS versions.
1016
- * [`Helper`]: Utility methods to retrieve (configuration) information from PHP_CodeSniffer 2.x as well as 3.x.
1017
-
1018
- ### Fixers
1019
-
1020
- * [`SpacesFixer`]: Utility to check and, if necessary, fix the whitespace between two tokens.
1021
-
1022
- ### TestUtils
1023
-
1024
- * [`UtilityMethodTestCase`]: Base class for use when testing utility methods for PHP_CodeSniffer.
1025
- Compatible with both PHPCS 2.x as well as 3.x. Supports PHPUnit 4.x up to 8.x.
1026
- See the usage instructions in the class docblock.
1027
-
1028
- ### Tokens
1029
-
1030
- * [`Collections`]: Collections of related tokens as often used and needed for sniffs.
1031
- These are additional "token groups" to compliment the ones available through the PHPCS native `PHP_CodeSniffer\Util\Tokens` class.
1032
-
1033
- ### Utils
1034
-
1035
- * [`Arrays`]: Utility functions for use when examining arrays.
1036
- * [`Conditions`]: Utility functions for use when examining token conditions.
1037
- * [`FunctionDeclarations`]: Utility functions for use when examining function declaration statements.
1038
- * [`GetTokensAsString`]: Utility functions to retrieve the content of a set of tokens as a string.
1039
- * [`Lists`]: Utility functions to retrieve information when working with lists.
1040
- * [`Namespaces`]: Utility functions for use when examining T_NAMESPACE tokens and to determine the namespace of arbitrary tokens.
1041
- * [`Numbers`]: Utility functions for working with integer/float tokens.
1042
- * [`ObjectDeclarations`]: Utility functions for use when examining object declaration statements.
1043
- * [`Operators`]: Utility functions for use when working with operators.
1044
- * [`Orthography`]: Utility functions for checking the orthography of arbitrary text strings.
1045
- * [`Parentheses`]: Utility functions for use when examining parenthesis tokens and arbitrary tokens wrapped in parentheses.
1046
- * [`PassedParameters`]: Utility functions to retrieve information about parameters passed to function calls, array declarations, isset and unset constructs.
1047
- * [`Scopes`]: Utility functions for use when examining token scopes.
1048
- * [`TextStrings`]: Utility functions for working with text string tokens.
1049
- * [`UseStatements`]: Utility functions for examining use statements.
1050
- * [`Variables`]: Utility functions for use when examining variables.
1051
-
1052
-
1053
- [Unreleased]: https://github.com/PHPCSStandards/PHPCSUtils/compare/stable...HEAD
1054
- [1.0.12]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.11...1.0.12
1055
- [1.0.11]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.10...1.0.11
1056
- [1.0.10]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.9...1.0.10
1057
- [1.0.9]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.8...1.0.9
1058
- [1.0.8]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.7...1.0.8
1059
- [1.0.7]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.6...1.0.7
1060
- [1.0.6]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.5...1.0.6
1061
- [1.0.5]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.4...1.0.5
1062
- [1.0.4]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.3...1.0.4
1063
- [1.0.3]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.2...1.0.3
1064
- [1.0.2]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.1...1.0.2
1065
- [1.0.1]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.0...1.0.1
1066
- [1.0.0]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.0-rc1...1.0.0
1067
- [1.0.0-rc1]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.0-alpha4...1.0.0-rc1
1068
- [1.0.0-alpha4]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.0-alpha3...1.0.0-alpha4
1069
- [1.0.0-alpha3]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.0-alpha2...1.0.0-alpha3
1070
- [1.0.0-alpha2]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.0-alpha1...1.0.0-alpha2
1071
-
1072
- [Composer PHPCS plugin]: https://github.com/PHPCSStandards/composer-installer
1073
- [PHP_CodeSniffer]: https://github.com/PHPCSStandards/PHP_CodeSniffer
1074
-
1075
- [`AbstractArrayDeclarationSniff`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-AbstractSniffs-AbstractArrayDeclarationSniff.html
1076
- [`BCFile`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-BackCompat-BCFile.html
1077
- [`BCTokens`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-BackCompat-BCTokens.html
1078
- [`Helper`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-BackCompat-Helper.html
1079
- [`SpacesFixer`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Fixers-SpacesFixer.html
1080
- [`UtilityMethodTestCase`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-TestUtils-UtilityMethodTestCase.html
1081
- [`Collections`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Tokens-Collections.html
1082
- [`TokenHelper`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Tokens-TokenHelper.html
1083
- [`Arrays`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Arrays.html
1084
- [`Conditions`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Conditions.html
1085
- [`Context`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Context.html
1086
- [`ControlStructures`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-ControlStructures.html
1087
- [`FunctionDeclarations`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-FunctionDeclarations.html
1088
- [`GetTokensAsString`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-GetTokensAsString.html
1089
- [`Lists`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Lists.html
1090
- [`MessageHelper`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-MessageHelper.html
1091
- [`Namespaces`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Namespaces.html
1092
- [`NamingConventions`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-NamingConventions.html
1093
- [`Numbers`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Numbers.html
1094
- [`ObjectDeclarations`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-ObjectDeclarations.html
1095
- [`Operators`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Operators.html
1096
- [`Orthography`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Orthography.html
1097
- [`Parentheses`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Parentheses.html
1098
- [`PassedParameters`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-PassedParameters.html
1099
- [`Scopes`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Scopes.html
1100
- [`TextStrings`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-TextStrings.html
1101
- [`UseStatements`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-UseStatements.html
1102
- [`Variables`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Variables.html
1103
-
1104
- [@fredden]: https://github.com/fredden
1105
- [@GaryJones]: https://github.com/GaryJones
1106
- [@szepeviktor]: https://github.com/szepeviktor