A tool to automatically fix PHP Coding Standards issues
PhpUnitAttributesFixer
by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7831
PhpUnitTestClassRequiresCoversFixer
- do not add annotation when there are attributes by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7880
PhpUnitMethodCasingFixer
- do not double underscore by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7949
FullyQualifiedStrictTypesFixer
- do not add imports before PHP opening tag by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7955
FullyQualifiedStrictTypesFixerTest
by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7954
PhpdocNoAccessFixerTest
by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7933
PhpUnitStrictFixerTest
by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7938
PhpUnitMethodCasingFixerTest
by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7948
Full Changelog: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.53.0...v3.54.0
PhpdocArrayTypeFixer
- JIT stack limit exhausted by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7895
@PHP84Migration
introduction by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7774
list
over array
in more places by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7905
AttributeAnalysis
by @HypeMC in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7909
array_filter
function usages by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7923
phpstan/phpstan-strict-rules
by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7924
trim
call by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7930
Full Changelog: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.52.1...v3.53.0
PhpCsFixer\Tokenizer\Tokens::setSize
return type by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7900
Full Changelog: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.52.0...v3.52.1
@Symfony:risky
- add no_unreachable_default_argument_value
by @gharlan in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7863
PhpCsFixer
ruleset - enable nullable_type_declaration_for_default_null_value
by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7870
array_indentation
to PER-CS2.0
ruleset by @VincentLanglet in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7881
no_useless_concat_operator
- do not break variable by @tamiroh in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7827
TokensAnalyzer
- handle unary operator in arrow functions by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7862
TypeExpression
- fix "JIT stack limit exhausted" error by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7843
nullable_type_declaration_for_default_null_value
- deprecate option that is against @PHP84Migration
by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7872
Full Changelog: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.51.0...v3.52.0
@Symfony
- add nullable_type_declaration by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7856
Full Changelog: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.50.0...v3.51.0
MbStrFunctionsFixer
- add support for mb_trim
, mb_ltrim
and mb_rtrim
functions by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7840
no_superfluous_phpdoc_tags
- introduce allow_hidden_params
option by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7743
NoEmptyPhpdocFixer
- do not leave empty line after removing PHPDoc by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7820
PhpdocArrayTypeFixer
by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7812
NamespaceUsesAnalyzer
by @Wirone in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7814
ExecutorWithoutErrorHandler
- remove invalid PHP 7.4 type by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7845
fully_qualified_strict_types
must honor template/local type identifiers by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7724
MethodArgumentSpaceFixer
- do not break heredoc/nowdoc by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7828
NumericLiteralSeparatorFixer
- do not change float
to int
when there is nothing after the dot by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7805
PhpUnitStrictFixer
- do not crash on property having the name of method to fix by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7804
SingleSpaceAroundConstructFixer
- correctly recognise multiple constants by @kubawerlos and @Wirone in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7700
TypeExpression
- handle array shape key with dash by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7841
<…>
by @gharlan in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7817
fully_qualified_strict_types
fixer by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7719
@large
on method level by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7832
@medium
on method level by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7833
symfony/var-dumper
in dev tools by @Wirone in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7795
Full Changelog: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.49.0...v3.50.0
string_implicit_backslashes
as escape_implicit_backslashes
replacement by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7669
PhpdocListTypeFixer
by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7796
ordered_types
to @Symfony
by @VincentLanglet in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7356
@PhpCsFixer
ruleset - enable php_unit_data_provider_static
by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7685
ClassKeywordFixer
must run before FullyQualifiedStrictTypesFixer
by @krzysztofrewak in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7767
LowercaseStaticReferenceFixer
- do not change typed constants by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7775
TypeExpression
- do not break type using walkTypes
method by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7785
ClassDefinitionFixer
for anonymous class with PHPDoc/attribute on separate line by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7546
function_to_constant
get_class()
replacement by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7770
PhpdocTypesFixer
- handle more complex types by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7791
gitlab
reporter in GitLab integration example by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7764
DescribeCommand
- better handling of deprecations by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7778
topic/core
issues/PRs from Stale Bot by @Wirone in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7788
Full Changelog: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.48.0...v3.49.0
PhpdocTypesOrderFixer
Support DNF types by @smnandre in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7732
NoUselessConcatOperatorFixer
- do not remove new line by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7759
FullyQualifiedStrictTypesFixer
must run before OrderedInterfacesFixer
by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7762
Full Changelog: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.47.1...v3.48.0
FullyQualifiedStrictTypesFixer
- do not modify statements with property fetch and ::
by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7749
FullyQualifiedStrictTypesFixer
- do not change case of the symbol when there's name collision between imported class and imported function by @kubawerlos in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7750
BinaryOperatorSpacesFixer
work as pre-v3.47 by @Wirone in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7751
Full Changelog: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.47.0...v3.47.1
heredoc_closing_marker
fixer by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7660
multiline_string_to_heredoc
fixer by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7665
numeric_literal_separator
fixer by @muuvmuuv and @Wirone in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/6761
spacing
option to PhpdocAlignFixer
by @kusab85 in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/6505
union_types
option to phpdoc_to_param_type
, phpdoc_to_property_type
, and phpdoc_to_return_type
fixers by @localheinz in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7672
fully_qualified_strict_types
by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7659
@PhpCsFixer
ruleset - enable no_whitespace_before_comma_in_array.after_heredoc
by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7670
no_superfluous_phpdoc_tags
- support for arrow function by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7666
heredoc_closing_marker
fixer by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7676
fully_qualified_strict_types
(respect declared symbols, relative imports, leading backslash in global namespace) by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7679
fully_qualified_strict_types
with leading_backslash_in_global_namespace
enabled - handle reserved types in phpDoc by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7648
BinaryOperatorSpacesFixer
- align correctly when multiple shifts occurs in single line by @wadakatu in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7593
ClassReferenceNameCasingFixer
capitalizes the property name after the nullsafe operator by @erickskrauch in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7696
no_superfluous_phpdoc_tags
must honor multiline docs by @mvorisek in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7697
NoSpaceAroundDoubleColonFixer
must run before MethodChainingIndentationFixer
by @mho22 in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7723
numeric_literal_separator
- Handle zero-leading floats properly by @muuvmuuv in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7737
PhpdocToReturnTypeFixerTest
- support for arrow functions by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7645
SimplifiedNullReturnFixer
- support array return typehint by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7728
numeric_literal_separator
by @muuvmuuv in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7735
ProjectCodeTests
- dry for function usage extractions by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7690
numeric_literal_separator
for project by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7713
Utils::sortElements
- better typing by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7646
actions/stale
v9 by @Wirone in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7710
NumericLiteralSeparatorFixer
- change default strategy to use_separator
by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7730
host.docker.internal
in Compose override template by @julienfalque in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7661
short_open_tag
by @keradus in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7638
Full Changelog: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.46.0...v3.47.0