Releases: PHP-CS-Fixer/PHP-CS-Fixer
Releases · PHP-CS-Fixer/PHP-CS-Fixer
v3.52.1 15 Keys
What's Changed
- fix:
PhpCsFixer\Tokenizer\Tokens::setSize
return type by @kubawerlos in #7900 - fix: StatementIndentationFixer - do not crash on ternary operator in class property by @kubawerlos in #7899
Full Changelog: v3.52.0...v3.52.1
v3.52.0 15 Keys
What's Changed
- feat:
@Symfony:risky
- addno_unreachable_default_argument_value
by @gharlan in #7863 - feat:
PhpCsFixer
ruleset - enablenullable_type_declaration_for_default_null_value
by @mvorisek in #7870 - feat: Add
array_indentation
toPER-CS2.0
ruleset by @VincentLanglet in #7881 - feat: Add support for callable template in PHPDoc parser by @mvorisek in #7084
- fix:
no_useless_concat_operator
- do not break variable by @tamiroh in #7827 - fix:
TokensAnalyzer
- handle unary operator in arrow functions by @kubawerlos in #7862 - fix:
TypeExpression
- fix "JIT stack limit exhausted" error by @kubawerlos in #7843 - fix: Constant invocation detected in DNF types by @SharkyKZ in #7869
- fix: Correctly indent multiline constants and properties by @julienfalque in #7875
- chore: fix PHP 8.4 deprecations by @kubawerlos in #7894
- chore: fix PHPStan 1.10.60 issues by @kubawerlos in #7873
- chore: list over array in more places by @keradus in #7876
- chore: replace template with variable in Preg class by @kubawerlos in #7882
- chore: update PHPStan by @kubawerlos in #7871
- depr:
nullable_type_declaration_for_default_null_value
- deprecate option that is against@PHP84Migration
by @keradus in #7872 - docs: Fix typo by @BenMorel in #7889
New Contributors
Full Changelog: v3.51.0...v3.52.0
v3.51.0 Insomnia
What's Changed
- feat:
@Symfony
- add nullable_type_declaration by @keradus in #7856 - chore: add missing tests for non-documentation classes by @kubawerlos in #7848
- chore: do not perform type analysis in tests by @kubawerlos in #7852
- chore: list over array in more places by @keradus in #7857
- chore: tests documentation classes by @kubawerlos in #7855
- test: fix wrong type in param annotation by @keradus in #7858
Full Changelog: v3.50.0...v3.51.0
v3.50.0 Insomnia
What's Changed
- feat: Ability to remove unused imports from multi-use statements by @Wirone in #7815
- feat: Support shortening symbols from multi-use statements (only classes for now) by @Wirone in #7816
- feat: allow PHPUnit 11 by @kubawerlos in #7824
- feat:
MbStrFunctionsFixer
- add support formb_trim
,mb_ltrim
andmb_rtrim
functions by @kubawerlos in #7840 - feat:
no_superfluous_phpdoc_tags
- introduceallow_hidden_params
option by @keradus in #7743 - feat:
NoEmptyPhpdocFixer
- do not leave empty line after removing PHPDoc by @kubawerlos in #7820 - feat: introduce
PhpdocArrayTypeFixer
by @kubawerlos in #7812 - feat: PhpUnitTestCaseStaticMethodCallsFixer - cover PHPUnit v11 methods by @kubawerlos in #7822
- feat: Support for multi-use statements in
NamespaceUsesAnalyzer
by @Wirone in #7814 - fix:
ExecutorWithoutErrorHandler
- remove invalid PHP 7.4 type by @kubawerlos in #7845 - fix:
fully_qualified_strict_types
must honor template/local type identifiers by @mvorisek in #7724 - fix:
MethodArgumentSpaceFixer
- do not break heredoc/nowdoc by @kubawerlos in #7828 - fix:
NumericLiteralSeparatorFixer
- do not changefloat
toint
when there is nothing after the dot by @kubawerlos in #7805 - fix:
PhpUnitStrictFixer
- do not crash on property having the name of method to fix by @kubawerlos in #7804 - fix:
SingleSpaceAroundConstructFixer
- correctly recognise multiple constants by @kubawerlos and @Wirone in #7700 - fix:
TypeExpression
- handle array shape key with dash by @kubawerlos in #7841 - fix: do not use wrongly named arguments in data providers by @kubawerlos in #7823
- fix: Ensure PCNTL extension is always installed in Docker by @Wirone in #7782
- fix: PhpdocListTypeFixer - support key types containing
<…>
by @gharlan in #7817 - fix: Proper build target for local Docker Compose by @Wirone in #7834
- fix: union PHPDoc support in
fully_qualified_strict_types
fixer by @mvorisek in #7719 - chore: add missing types by @kubawerlos in #7842
- chore: BlocksAnalyzer - raise exception on invalid index by @keradus in #7819
- chore: DataProviderAnalysis - expect list over array by @keradus in #7800
- chore: do not use
@large
on method level by @kubawerlos in #7832 - chore: do not use
@medium
on method level by @kubawerlos in #7833 - chore: Fix typos by @tamiroh in #7835
- chore: rename variables by @kubawerlos in #7847
- chore: some improvements around array typehints by @keradus in #7799
- CI: fix PHP 8.4 job by @kubawerlos in #7829
- DX: Include
symfony/var-dumper
in dev tools by @Wirone in #7795
New Contributors
Full Changelog: v3.49.0...v3.50.0
v3.49.0 Insomnia
What's Changed
- feat: introduce
string_implicit_backslashes
asescape_implicit_backslashes
replacement by @mvorisek in #7669 - feat: introduce
PhpdocListTypeFixer
by @kubawerlos in #7796 - feat: Add
ordered_types
to@Symfony
by @VincentLanglet in #7356 - feat: update Symfony.nullable_type_declaration_for_default_null_value config by @keradus in #7773
- feat:
@PhpCsFixer
ruleset - enablephp_unit_data_provider_static
by @mvorisek in #7685 - fix:
ClassKeywordFixer
must run beforeFullyQualifiedStrictTypesFixer
by @krzysztofrewak in #7767 - fix:
LowercaseStaticReferenceFixer
- do not change typed constants by @kubawerlos in #7775 - fix:
TypeExpression
- do not break type usingwalkTypes
method by @kubawerlos in #7785 - fix:
ClassDefinitionFixer
for anonymous class with PHPDoc/attribute on separate line by @mvorisek in #7546 - fix:
function_to_constant
get_class()
replacement by @mvorisek in #7770 - fix: Allow using cache when running in Docker distribution by @Wirone in #7769
- fix:
PhpdocTypesFixer
- handle more complex types by @kubawerlos in #7791 - docs: Docker - use
gitlab
reporter in GitLab integration example by @keradus in #7764 - docs: Docker in CI - don't suggest command that overrides path from config file by @keradus in #7763
- DX: check deprecations exactly by @keradus in #7742
- chore:
DescribeCommand
- better handling of deprecations by @kubawerlos in #7778 - chore: Exclude
topic/core
issues/PRs from Stale Bot by @Wirone in #7788 - chore: add missing key types in PHPDoc types by @kubawerlos in #7779
- chore(checkbashisms): update to 2.23.7 by @kubawerlos in #7780
Full Changelog: v3.48.0...v3.49.0
v3.48.0 Small Changes
What's Changed
- feat:
PhpdocTypesOrderFixer
Support DNF types by @smnandre in #7732 - fix: work correctly for a switch/case with ternary operator by @kubawerlos in #7756
- fix:
NoUselessConcatOperatorFixer
- do not remove new line by @kubawerlos in #7759 - fix: Support shebang in fixers operating on PHP opening tag by @mvorisek in #7687
- docs: Add PHP-CS-Fixer integration in a GitHub Action step by @Arkanii in #7757
- chore:
FullyQualifiedStrictTypesFixer
must run beforeOrderedInterfacesFixer
by @kubawerlos in #7762
New Contributors
Full Changelog: v3.47.1...v3.48.0
v3.47.1 Big Changes
What's Changed
- fix: Proper Docker image name suffix by @Wirone in #7739
- fix:
FullyQualifiedStrictTypesFixer
- do not modify statements with property fetch and::
by @kubawerlos in #7749 - fix:
FullyQualifiedStrictTypesFixer
- do not change case of the symbol when there's name collision between imported class and imported function by @kubawerlos in #7750 - fix: make
BinaryOperatorSpacesFixer
work as pre-v3.47 by @Wirone in #7751 - fix: Do not override short name with relative (longer) reference by @Wirone in #7752
Full Changelog: v3.47.0...v3.47.1
v3.47.0 Big Changes
What's Changed
- refactor: increase performance by ~7% thanks to Tokens::block*Cache hit increased by ~12% by @keradus in #6176
- refactor: Tokens - fast check for non-block in 'detectBlockType', evaluate definitions only once in 'getBlockEdgeDefinitions' by @keradus in #7655
- refactor: Tokens::clearEmptyTokens - play defensive with cache clearing by @keradus in #7658
- feat: Add support for official Docker images of Fixer by @hgiesenow and @Wirone in #7555
- feat: Introduce
heredoc_closing_marker
fixer by @mvorisek in #7660 - feat: Introduce
multiline_string_to_heredoc
fixer by @mvorisek in #7665 - feat: Introduce
numeric_literal_separator
fixer by @muuvmuuv and @Wirone in #6761 - feat: Add
spacing
option toPhpdocAlignFixer
by @kusab85 in #6505 - feat: Add
union_types
option tophpdoc_to_param_type
,phpdoc_to_property_type
, andphpdoc_to_return_type
fixers by @localheinz in #7672 - feat: Support typed properties and attributes in
fully_qualified_strict_types
by @mvorisek in #7659 - feat:
@PhpCsFixer
ruleset - enableno_whitespace_before_comma_in_array.after_heredoc
by @mvorisek in #7670 - feat:
no_superfluous_phpdoc_tags
- support for arrow function by @keradus in #7666 - feat: Simplify closing marker when possible in
heredoc_closing_marker
fixer by @mvorisek in #7676 - fix: Several improvements for
fully_qualified_strict_types
(respect declared symbols, relative imports, leading backslash in global namespace) by @mvorisek in #7679 - fix:
fully_qualified_strict_types
withleading_backslash_in_global_namespace
enabled - handle reserved types in phpDoc by @mvorisek in #7648 - fix:
BinaryOperatorSpacesFixer
- align correctly when multiple shifts occurs in single line by @wadakatu in #7593 - fix:
ClassReferenceNameCasingFixer
capitalizes the property name after the nullsafe operator by @erickskrauch in #7696 - fix:
no_superfluous_phpdoc_tags
must honor multiline docs by @mvorisek in #7697 - fix:
NoSpaceAroundDoubleColonFixer
must run beforeMethodChainingIndentationFixer
by @mho22 in #7723 - fix:
numeric_literal_separator
- Handle zero-leading floats properly by @muuvmuuv in #7737 - fix: Improve progress bar visual layer by @Slamdunk in #7708
- fix: indentation of control structure body without braces by @julienfalque in #7663
- fix: make sure all PHP extensions required by PHPUnit are installed by @kubawerlos in #7727
- fix:
PhpdocToReturnTypeFixerTest
- support for arrow functions by @keradus in #7645 - fix:
SimplifiedNullReturnFixer
- support array return typehint by @keradus in #7728 - fix: Support numeric values without leading zero in
numeric_literal_separator
by @muuvmuuv in #7735 - chore: better identify EXPERIMENTAL rules by @keradus in #7729
- chore: fix issue detected by unlocked PHPStan + upgrade dev-tools by @keradus in #7678
- chore: handle extract() by @keradus in #7684
- chore: Mention contributors in app info by @mvorisek in #7668
- chore: no need to mark private methods as internal by @keradus in #7715
- chore:
ProjectCodeTests
- dry for function usage extractions by @keradus in #7690 - chore: reduce PHPStan baseline by @keradus in #7644
- chore: use numeric literal separator for PHP version IDs by @keradus in #7712
- chore: use
numeric_literal_separator
for project by @keradus in #7713 - chore:
Utils::sortElements
- better typing by @keradus in #7646 - CI: Allow running Stale Bot on demand by @Wirone in #7711
- CI: Fix PHP 8.4 by @mvorisek and @Wirone in #7702
- CI: Give write permissions to Stale Bot by @Wirone in #7716
- CI: Use
actions/stale
v9 by @Wirone in #7710 - docs: Add information about allowing maintainers to update PRs by @Wirone in #7683
- docs: CONTRIBUTING.md - update Opening a PR by @keradus in #7691
- docs: Display/include tool info/version by default in commands and reports by @keradus in #7733
- DX:
NumericLiteralSeparatorFixer
- change default strategy touse_separator
by @keradus in #7730 - DX: fix deprecation tests warnings for PHP 7.4 by @mvorisek in #7725
- DX: update
host.docker.internal
in Compose override template by @julienfalque in #7661 - test: ensure we do not forget to run any test related to
short_open_tag
by @keradus in #7638
New Contributors
- @hgiesenow made their first contribution in #7555
- @erickskrauch made their first contribution in #7696
- @mho22 made their first contribution in #7723
Full Changelog: v3.46.0...v3.47.0
v3.46.0 Three Keys
What's Changed
- chore: reduce PHPStan baseline by @keradus in #7643
- fix: PHP_CS_FIXER_FUTURE_MODE - proper boolean validation by @keradus in #7651
- feat: change default ruleset to
@PER-CS
(only behind PHP_CS_FIXER_FUTURE_MODE=1) by @keradus in #7650 - fix: PhpdocToParamTypeFixerTest - support for arrow functions by @keradus in #7647
- feat: Support new/instanceof/use trait in
fully_qualified_strict_types
by @mvorisek in #7653 - chore: fix internal typehints in Tokens by @keradus in #7656
- docs: Show class with unit tests by @mvorisek in #7667
- fix: Handle FQCN properly with
leading_backslash_in_global_namespace
option enabled by @mvorisek in #7654 - fix: FQCN parse phpdoc using full grammar regex by @mvorisek in #7649
Full Changelog: v3.45.0...v3.46.0