diff --git a/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php b/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php index f4bb0c024ad..7857154f46c 100644 --- a/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php +++ b/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php @@ -103,12 +103,12 @@ public function isCandidate(Tokens $tokens): bool /** * {@inheritdoc} * - * Must run before NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer. + * Must run before FullyQualifiedStrictTypesFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer. * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer. */ public function getPriority(): int { - return 7; + return 8; } protected function isSkippedType(string $type): bool diff --git a/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php b/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php index 763cfdf3430..62c28eef33d 100644 --- a/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php +++ b/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php @@ -217,7 +217,7 @@ public function foo(): \Other\FunctionReturnType * {@inheritdoc} * * Must run before NoSuperfluousPhpdocTagsFixer, OrderedAttributesFixer, OrderedImportsFixer, OrderedInterfacesFixer, StatementIndentationFixer. - * Must run after ClassKeywordFixer, PhpUnitAttributesFixer, PhpdocToReturnTypeFixer. + * Must run after ClassKeywordFixer, PhpUnitAttributesFixer, PhpdocToPropertyTypeFixer, PhpdocToReturnTypeFixer. */ public function getPriority(): int { diff --git a/tests/AutoReview/FixerFactoryTest.php b/tests/AutoReview/FixerFactoryTest.php index 1e71cf2adca..79f3127a01a 100644 --- a/tests/AutoReview/FixerFactoryTest.php +++ b/tests/AutoReview/FixerFactoryTest.php @@ -848,6 +848,7 @@ private static function getFixersPriorityGraph(): array 'no_superfluous_phpdoc_tags', ], 'phpdoc_to_property_type' => [ + 'fully_qualified_strict_types', 'no_superfluous_phpdoc_tags', ], 'phpdoc_to_return_type' => [ diff --git a/tests/Fixtures/Integration/priority/phpdoc_to_property_type,fully_qualified_strict_types.test b/tests/Fixtures/Integration/priority/phpdoc_to_property_type,fully_qualified_strict_types.test new file mode 100644 index 00000000000..2bb8fa8f29e --- /dev/null +++ b/tests/Fixtures/Integration/priority/phpdoc_to_property_type,fully_qualified_strict_types.test @@ -0,0 +1,24 @@ +--TEST-- +Integration of fixers: phpdoc_to_property_type,fully_qualified_strict_types. +--RULESET-- +{"phpdoc_to_property_type":{"map_types":{"TFixer":"\\PhpCsFixer\\AbstractFixer"}},"fully_qualified_strict_types":{"import_symbols":true}} +--EXPECT-- +