From a8012319a6f8aa79ec281acef2b9e43dd163e302 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:37:46 +0000 Subject: [PATCH] release: 1.2.25 --- CHANGELOG.md | 4 + README.md | 73 +-------- package.json | 450 +-------------------------------------------------- 3 files changed, 10 insertions(+), 517 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6aebb2c..5e5e7d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 1.2.25 + +- Upgrade fmt.stub.php [(Verror code: 525)](https://github.com/driade/phpfmt8/releases/tag/verror code: 525) + ### 1.2.24 - Upgrade fmt.stub.php [(V1035.0.0)](https://github.com/driade/phpfmt8/releases/tag/v1035.0.0) diff --git a/README.md b/README.md index 162d327..7b0eecf 100644 --- a/README.md +++ b/README.md @@ -108,78 +108,7 @@ transformation. | Key | Description | | -------- | ----------- | -| SmartLnAfterCurlyOpen | Add line break when implicit curly block is added. | -| AddMissingParentheses | Add extra parentheses in new instantiations. | -| AliasToMaster | Replace function aliases to their masters - only basic syntax alias. | -| AlignConstVisibilityEquals | Vertically align "=" of visibility and const blocks. | -| AlignDoubleArrow | Vertically align T_DOUBLE_ARROW (=>). | -| AlignComments | Vertically align "//" comments. | -| AlignDoubleSlashComments | Vertically align "//" comments. | -| AlignEquals | Vertically align "=". | -| AlignGroupDoubleArrow | Vertically align T_DOUBLE_ARROW (=>) by line groups. | -| AlignPHPCode | Align PHP code within HTML block. | -| AlignTypehint | Vertically align function type hints. | -| AllmanStyleBraces | Transform all curly braces into Allman-style. | -| AutoPreincrement | Automatically convert postincrement to preincrement. | -| AutoSemicolon | Add semicolons in statements ends. | -| CakePHPStyle | Applies CakePHP Coding Style | -| ClassToSelf | "self" is preferred within class, trait or interface. | -| ClassToStatic | "static" is preferred within class, trait or interface. | -| ConvertOpenTagWithEcho | Convert from " implode()). | -| LeftWordWrap | Word wrap at 80 columns - left justify. | -| LongArray | Convert short to long arrays. | -| MergeElseIf | Merge if with else. | -| SplitElseIf | Merge if with else. | -| MergeNamespaceWithOpenTag | Ensure there is no more than one linebreak before namespace | -| MildAutoPreincrement | Automatically convert postincrement to preincrement. (Deprecated pass. Use AutoPreincrement instead). | -| NewLineBeforeReturn | Add an empty line before T_RETURN. | -| OrganizeClass | Organize class, interface and trait structure. | -| OrderAndRemoveUseClauses | Order use block and remove unused imports. | -| OnlyOrderUseClauses | Order use block - do not remove unused imports. | -| OrderMethod | Organize class, interface and trait structure. | -| OrderMethodAndVisibility | Organize class, interface and trait structure. | -| PHPDocTypesToFunctionTypehint | Read variable types from PHPDoc blocks and add them in function signatures. | -| PrettyPrintDocBlocks | Prettify Doc Blocks | -| PSR2EmptyFunction | Merges in the same line of function header the body of empty functions. | -| PSR2MultilineFunctionParams | Break function parameters into multiple lines. | -| ReindentAndAlignObjOps | Align object operators. | -| ReindentSwitchBlocks | Reindent one level deeper the content of switch blocks. | -| ReindentEnumBlocks | Reindent one level deeper the content of enum blocks. | -| RemoveIncludeParentheses | Remove parentheses from include declarations. | -| RemoveSemicolonAfterCurly | Remove semicolon after closing curly brace. | -| RemoveUseLeadingSlash | Remove leading slash in T_USE imports. | -| ReplaceBooleanAndOr | Convert from "and"/"or" to "&&"/"||". Danger! This pass leads to behavior change. | -| ReplaceIsNull | Replace is_null($a) with null === $a. | -| RestoreComments | Revert any formatting of comments content. | -| ReturnNull | Simplify empty returns. | -| ShortArray | Convert old array into new array. (array() -> []) | -| SortUseNameSpace | Organize use clauses by length and alphabetic order. | -| SpaceAroundControlStructures | Add space around control structures. | -| SpaceAroundExclamationMark | Add spaces around exclamation mark. | -| SpaceBetweenMethods | Put space between methods. | -| StrictBehavior | Activate strict option in array_search, base64_decode, in_array, array_keys, mb_detect_encoding. Danger! This pass leads to behavior change. | -| StrictComparison | All comparisons are converted to strict. Danger! This pass leads to behavior change. | -| StripExtraCommaInArray | Remove trailing commas within array blocks | -| StripNewlineAfterClassOpen | Strip empty lines after class opening curly brace. | -| StripNewlineAfterCurlyOpen | Strip empty lines after opening curly brace. | -| StripNewlineWithinClassBody | Strip empty lines after class opening curly brace. | -| StripSpaces | Remove all empty spaces | -| StripSpaceWithinControlStructures | Strip empty lines within control structures. | -| TightConcat | Ensure string concatenation does not have spaces, except when close to numbers. | -| TrimSpaceBeforeSemicolon | Remove empty lines before semi-colon. | -| UpgradeToPreg | Upgrade ereg_* calls to preg_* | -| WordWrap | Word wrap at 80 columns. | -| WrongConstructorName | Update old constructor names into new ones. http://php.net/manual/en/language.oop5.decon.php | -| YodaComparisons | Execute Yoda Comparisons. | -| SpaceAfterExclamationMark | Add space after exclamation mark. | -| SpaceAroundParentheses | Add spaces inside parentheses. | +| error | code: 525 | ## Contribute diff --git a/package.json b/package.json index f120222..20e79a2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vscode-phpfmt", "displayName": "phpfmt - PHP formatter", - "version": "1.2.24", + "version": "1.2.25", "description": "Integrates phpfmt into VS Code", "main": "./dist/extension", "scripts": { @@ -179,228 +179,8 @@ "description": "call specific compiler pass", "items": { "type": "string", - "enum": [ - "AddMissingCurlyBraces", - "AutoImportPass", - "ConstructorPass", - "EliminateDuplicatedEmptyLines", - "ExtraCommaInArray", - "LeftAlignComment", - "MergeCurlyCloseAndDoWhile", - "MergeDoubleArrowAndArray", - "MergeParenCloseWithCurlyOpen", - "NormalizeIsNotEquals", - "NormalizeLnAndLtrimLines", - "SmartLnAfterCurlyOpen", - "MatchNewLineAndCurlys", - "Reindent", - "ReindentColonBlocks", - "ReindentComments", - "ReindentEqual", - "ReindentObjOps", - "ResizeSpaces", - "RTrim", - "SettersAndGettersPass", - "SplitCurlyCloseAndTokens", - "StripExtraCommaInList", - "TwoCommandsInSameLine", - "PSR1BOMMark", - "PSR1ClassConstants", - "PSR1ClassNames", - "PSR1MethodNames", - "PSR1OpenTags", - "PSR2AlignObjOp", - "PSR2CurlyOpenNextLine", - "PSR2IndentWithSpace", - "PSR2KeywordsLowerCase", - "PSR2LnAfterNamespace", - "PSR2ModifierVisibilityStaticOrder", - "PSR2SingleEmptyLineAndStripClosingTag", - "AddMissingParentheses", - "AliasToMaster", - "AlignConstVisibilityEquals", - "AlignDoubleArrow", - "AlignComments", - "AlignEquals", - "AlignPHPCode", - "AlignTypehint", - "AllmanStyleBraces", - "AutoPreincrement", - "AutoSemicolon", - "CakePHPStyle", - "ClassToSelf", - "ConvertOpenTagWithEcho", - "DocBlockToComment", - "DoubleToSingleQuote", - "EchoToPrint", - "EncapsulateNamespaces", - "GeneratePHPDoc", - "IndentTernaryConditions", - "LeftWordWrap", - "LongArray", - "MergeElseIf", - "SplitElseIf", - "MergeNamespaceWithOpenTag", - "NewLineBeforeReturn", - "NoSpaceAfterPHPDocBlocks", - "OrganizeClass", - "OrderAndRemoveUseClauses", - "PHPDocTypesToFunctionTypehint", - "PrettyPrintDocBlocks", - "PSR2EmptyFunction", - "PSR2MultilineFunctionParams", - "ReindentAndAlignObjOps", - "ReindentSwitchBlocks", - "ReindentEnumBlocks", - "RemoveIncludeParentheses", - "RemoveSemicolonAfterCurly", - "RemoveUseLeadingSlash", - "ReplaceBooleanAndOr", - "ReplaceIsNull", - "RestoreComments", - "ReturnNull", - "ShortArray", - "SortUseNameSpace", - "SpaceAroundControlStructures", - "SpaceAroundExclamationMark", - "SpaceBetweenMethods", - "StrictBehavior", - "StrictComparison", - "StripExtraCommaInArray", - "StripNewlineAfterClassOpen", - "StripNewlineAfterCurlyOpen", - "StripNewlineWithinClassBody", - "StripSpaces", - "StripSpaceWithinControlStructures", - "TightConcat", - "TrimSpaceBeforeSemicolon", - "UpgradeToPreg", - "WordWrap", - "WrongConstructorName", - "YodaComparisons", - "SpaceAfterExclamationMark", - "SpaceAroundParentheses", - "WPResizeSpaces", - "AlignDoubleSlashComments", - "AlignGroupDoubleArrow", - "ClassToStatic", - "JoinToImplode", - "MildAutoPreincrement", - "OnlyOrderUseClauses", - "OrderMethod", - "OrderMethodAndVisibility" - ], - "enumDescriptions": [ - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Add line break when implicit curly block is added.", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Add extra parentheses in new instantiations.", - "Replace function aliases to their masters - only basic syntax alias.", - "Vertically align \"=\" of visibility and const blocks.", - "Vertically align T_DOUBLE_ARROW (=>).", - "Vertically align \"//\" comments.", - "Vertically align \"=\".", - "Align PHP code within HTML block.", - "Vertically align function type hints.", - "Transform all curly braces into Allman-style.", - "Automatically convert postincrement to preincrement.", - "Add semicolons in statements ends.", - "Applies CakePHP Coding Style", - "\"self\" is preferred within class, trait or interface.", - "Convert from \" [])", - "Organize use clauses by length and alphabetic order.", - "Add space around control structures.", - "Add spaces around exclamation mark.", - "Put space between methods.", - "Activate strict option in array_search, base64_decode, in_array, array_keys, mb_detect_encoding. Danger! This pass leads to behavior change.", - "All comparisons are converted to strict. Danger! This pass leads to behavior change.", - "Remove trailing commas within array blocks", - "Strip empty lines after class opening curly brace.", - "Strip empty lines after opening curly brace.", - "Strip empty lines after class opening curly brace.", - "Remove all empty spaces", - "Strip empty lines within control structures.", - "Ensure string concatenation does not have spaces, except when close to numbers.", - "Remove empty lines before semi-colon.", - "Upgrade ereg_* calls to preg_*", - "Word wrap at 80 columns.", - "Update old constructor names into new ones. http://php.net/manual/en/language.oop5.decon.php", - "Execute Yoda Comparisons.", - "Add space after exclamation mark.", - "Add spaces inside parentheses.", - "Core pass", - "Vertically align \"//\" comments.", - "Vertically align T_DOUBLE_ARROW (=>) by line groups.", - "\"static\" is preferred within class, trait or interface.", - "Replace implode() alias (join() -> implode()).", - "Automatically convert postincrement to preincrement. (Deprecated pass. Use AutoPreincrement instead).", - "Order use block - do not remove unused imports.", - "Organize class, interface and trait structure.", - "Organize class, interface and trait structure." - ] + "enum": [], + "enumDescriptions": [] } }, "phpfmt.exclude": { @@ -409,228 +189,8 @@ "description": "disable specific passes", "items": { "type": "string", - "enum": [ - "AddMissingCurlyBraces", - "AutoImportPass", - "ConstructorPass", - "EliminateDuplicatedEmptyLines", - "ExtraCommaInArray", - "LeftAlignComment", - "MergeCurlyCloseAndDoWhile", - "MergeDoubleArrowAndArray", - "MergeParenCloseWithCurlyOpen", - "NormalizeIsNotEquals", - "NormalizeLnAndLtrimLines", - "SmartLnAfterCurlyOpen", - "MatchNewLineAndCurlys", - "Reindent", - "ReindentColonBlocks", - "ReindentComments", - "ReindentEqual", - "ReindentObjOps", - "ResizeSpaces", - "RTrim", - "SettersAndGettersPass", - "SplitCurlyCloseAndTokens", - "StripExtraCommaInList", - "TwoCommandsInSameLine", - "PSR1BOMMark", - "PSR1ClassConstants", - "PSR1ClassNames", - "PSR1MethodNames", - "PSR1OpenTags", - "PSR2AlignObjOp", - "PSR2CurlyOpenNextLine", - "PSR2IndentWithSpace", - "PSR2KeywordsLowerCase", - "PSR2LnAfterNamespace", - "PSR2ModifierVisibilityStaticOrder", - "PSR2SingleEmptyLineAndStripClosingTag", - "AddMissingParentheses", - "AliasToMaster", - "AlignConstVisibilityEquals", - "AlignDoubleArrow", - "AlignComments", - "AlignEquals", - "AlignPHPCode", - "AlignTypehint", - "AllmanStyleBraces", - "AutoPreincrement", - "AutoSemicolon", - "CakePHPStyle", - "ClassToSelf", - "ConvertOpenTagWithEcho", - "DocBlockToComment", - "DoubleToSingleQuote", - "EchoToPrint", - "EncapsulateNamespaces", - "GeneratePHPDoc", - "IndentTernaryConditions", - "LeftWordWrap", - "LongArray", - "MergeElseIf", - "SplitElseIf", - "MergeNamespaceWithOpenTag", - "NewLineBeforeReturn", - "NoSpaceAfterPHPDocBlocks", - "OrganizeClass", - "OrderAndRemoveUseClauses", - "PHPDocTypesToFunctionTypehint", - "PrettyPrintDocBlocks", - "PSR2EmptyFunction", - "PSR2MultilineFunctionParams", - "ReindentAndAlignObjOps", - "ReindentSwitchBlocks", - "ReindentEnumBlocks", - "RemoveIncludeParentheses", - "RemoveSemicolonAfterCurly", - "RemoveUseLeadingSlash", - "ReplaceBooleanAndOr", - "ReplaceIsNull", - "RestoreComments", - "ReturnNull", - "ShortArray", - "SortUseNameSpace", - "SpaceAroundControlStructures", - "SpaceAroundExclamationMark", - "SpaceBetweenMethods", - "StrictBehavior", - "StrictComparison", - "StripExtraCommaInArray", - "StripNewlineAfterClassOpen", - "StripNewlineAfterCurlyOpen", - "StripNewlineWithinClassBody", - "StripSpaces", - "StripSpaceWithinControlStructures", - "TightConcat", - "TrimSpaceBeforeSemicolon", - "UpgradeToPreg", - "WordWrap", - "WrongConstructorName", - "YodaComparisons", - "SpaceAfterExclamationMark", - "SpaceAroundParentheses", - "WPResizeSpaces", - "AlignDoubleSlashComments", - "AlignGroupDoubleArrow", - "ClassToStatic", - "JoinToImplode", - "MildAutoPreincrement", - "OnlyOrderUseClauses", - "OrderMethod", - "OrderMethodAndVisibility" - ], - "enumDescriptions": [ - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Add line break when implicit curly block is added.", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Core pass", - "Add extra parentheses in new instantiations.", - "Replace function aliases to their masters - only basic syntax alias.", - "Vertically align \"=\" of visibility and const blocks.", - "Vertically align T_DOUBLE_ARROW (=>).", - "Vertically align \"//\" comments.", - "Vertically align \"=\".", - "Align PHP code within HTML block.", - "Vertically align function type hints.", - "Transform all curly braces into Allman-style.", - "Automatically convert postincrement to preincrement.", - "Add semicolons in statements ends.", - "Applies CakePHP Coding Style", - "\"self\" is preferred within class, trait or interface.", - "Convert from \" [])", - "Organize use clauses by length and alphabetic order.", - "Add space around control structures.", - "Add spaces around exclamation mark.", - "Put space between methods.", - "Activate strict option in array_search, base64_decode, in_array, array_keys, mb_detect_encoding. Danger! This pass leads to behavior change.", - "All comparisons are converted to strict. Danger! This pass leads to behavior change.", - "Remove trailing commas within array blocks", - "Strip empty lines after class opening curly brace.", - "Strip empty lines after opening curly brace.", - "Strip empty lines after class opening curly brace.", - "Remove all empty spaces", - "Strip empty lines within control structures.", - "Ensure string concatenation does not have spaces, except when close to numbers.", - "Remove empty lines before semi-colon.", - "Upgrade ereg_* calls to preg_*", - "Word wrap at 80 columns.", - "Update old constructor names into new ones. http://php.net/manual/en/language.oop5.decon.php", - "Execute Yoda Comparisons.", - "Add space after exclamation mark.", - "Add spaces inside parentheses.", - "Core pass", - "Vertically align \"//\" comments.", - "Vertically align T_DOUBLE_ARROW (=>) by line groups.", - "\"static\" is preferred within class, trait or interface.", - "Replace implode() alias (join() -> implode()).", - "Automatically convert postincrement to preincrement. (Deprecated pass. Use AutoPreincrement instead).", - "Order use block - do not remove unused imports.", - "Organize class, interface and trait structure.", - "Organize class, interface and trait structure." - ] + "enum": [], + "enumDescriptions": [] } }, "phpfmt.smart_linebreak_after_curly": {