Skip to content

Add new relevant fixers from php-cs-fixer 3.0+ #94

Closed
@OndraM

Description

@OndraM

List of newly added fixers or their new features, which I collected from release notes of php-cs-fixer from version 3.0 to currently latest 3.54.0.

For each of them we should consider whether to introduce it or not (and check whether it is not already loaded).

  • Add spacing option to PhpdocAlignFixer 🆕 Added whole fixer
  • ArrayIndentationFixer - Support for array destructuring 🆕 Added whole fixer
  • AssignNullCoalescingToCoalesceEqualFixer 🆕 Added
  • AttributeEmptyParenthesesFixer 🆕 Added
  • BinaryOperatorSpacesFixer - add at least one space around binary operators - ❌ don't want this setting
  • BlankLineBetweenImportGroupsFixer - does not seem useful for us
  • ClassAttributesSeparationFixer - Introduce only_if_meta spacing option - ❌ don't want
  • ClassDefinitionFixer - PSR12 for anonymous class - already used
  • ClassKeywordFixer - does not seem useful for us
  • ClassReferenceNameCasingFixer 🆕 Added
  • DateTimeCreateFromFormatCallFixer - 🤔 may change behavior, but good idea
  • Deprecate CompactNullableTypehintFixer and proxy to CompactNullableTypeDeclarationFixer - already use the new one
  • Deprecate CurlyBracesPositionFixer and proxy to BracesPositionFixer - not used directly
  • Deprecate NewWithBracesFixer and proxy to NewWithParenthesesFixer by
  • Deprecate NoUnneededCurlyBracesFixer and proxy to NoUnneededBracesFixer - not used
  • EmptyLoopBodyFixer ❌ don't want
  • EmptyLoopConditionFixer - does not seem useful for us
  • FullyQualifiedStrictTypesFixer - add import_symbols option - 🆕 Added
  • FullyQualifiedStrictTypesFixer - add leading_backslash_in_global_namespace option - ❌ don't want
  • GetClassToClassKeywordFixer - ❌ does not seem useful for us
  • HeredocClosingMarker - ❌ don't want
  • IntegerLiteralCaseFixer - does not seem useful for us
  • Introduce configurability to PhpdocOrderFixer - already used
  • Introduce configurability to PhpdocSeparationFixer - ❌ don't want the fixer altogether
  • LongToShorthandOperatorFixer - 🆕 Added
  • MethodArgumentSpaceFixer - add attribute_placement option - 🆕 enabled
  • ModernizeStrposFixer - does not work with mb_strpos, so it is basically useless
  • MultilineStringToHeredocFixer - 🆕 Added
  • NativeTypeDeclarationCasingFixer - already used
  • NoAliasFunctionsFixer - Add more function aliases 🆕 Added @all set
  • NoExtraBlankLinesFixer - 🆕 reconfigured
  • NoSpaceAroundDoubleColonFixer 🆕 Added
  • NoSuperfluousPhpdocTags - introduce allow_hidden_params option - ❌ not useful for us
  • NoTrailingCommaInSinglelineFixer - already used
  • NoUnneededControlParenthesesFixer - Fix more cases - 🆕 reconfigured
  • NoUnneededImportAliasFixer 🆕 Added
  • NoUselessConcatOperatorFixer - ❌ not sure if useful
  • NoUselessNullsafeOperatorFixer - ❌ seems not really useful
  • NullableTypeDeclarationFixer 🆕 Added
  • NullableTypeDeclarationForDefaultNullValue - support for nullability in union types - 🆕 Added
  • NumericLiteralSeparatorFixer - ❌ seems too opinionated
  • OctalNotationFixer 🆕 Added for PHP 8.1+
  • OrderedClassElementsFixer - handle enums 🆕 Added
  • OrderedInterfacesFixer - ❌ don't want
  • OrderedTypesFixer - ❌ does not seem useful for us
  • PhpdocArrayTypeFixer - ❌ don't want
  • PhpdocListTypeFixer - ❌ don't want
  • PhpdocReadonlyClassCommentToKeywordFixer - ❌ does not seem useful for us
  • PhpdocTo(Property/Return/Param)Fixer - allow fixing mixed on PHP 8 - already added
  • PhpdocTo(Property/Return/Param)Fixer - allow fixing union types on PHP 8 - already added
  • PhpdocToCommentFixer - Add ignored_tags option 🆕 Added
  • PhpdocToCommentFixer - Add option to handle return as valid docblock usage - ❌ does not seem useful for us
  • PhpdocToPropertyTypeFixer - already added
  • PhpUnitAttributesFixer - relevant only with PHPUnit 10 (and PHP 8.1+), so added only to readme
  • PhpUnitDataProviderNameFixer - ❌ would require renaming all providers
  • PhpUnitDataProviderReturnTypeFixer - ❌ don't want
  • PhpUnitDataProviderStaticFixer - ❌ don't want
  • PhpUnitInternalClassFixer - ❌ don't want
  • ReturnToYieldFromFixerr - ❌ don't want
  • SimpleToComplexStringVariable - 🆕 Added for PHP 8.2+
  • SingleLineCommentSpacingFixer 🆕 Added
  • SingleLineEmptyBodyFixer - 🆕 Added
  • SpacesInsideParenthesesFixer - will be part of updated PSR12 (instead of NoSpacesInsideParenthesisFixer)
  • StatementIndentationFixer - already used
  • StringImplicitBackslashesFixer as EscapeImplicitBackslashesFixer replacement- ❌ does not seem useful for us
  • StringLengthToEmptyFixer - does not seem useful for us
  • TrailingCommaInMultilineFixer - ♻️ used new configuration accoring to PER2.0
  • TypeDeclarationSpacesFixer - already use
  • TypesSpacesFixer ♻️ Added instead of UnionTypeHintFormatSniff
  • UnaryOperatorSpacesFixer - introduce only_dec_inc config - ❌ don't want
  • WhitespaceAfterCommaInArrayFixer - add option "ensure_single_space" - ❌ don't want this setting
  • YieldFromArrayToYieldsFixer - ❌ don't want

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions