[php-src] Issue #19059: PhpUnitDataProviderMethodOrderFixer is broken
| From: | mvorisek | Date: | Mon, 07 Jul 2025 10:35:50 +0000 |
| Subject: | [php-src] Issue #19059: PhpUnitDataProviderMethodOrderFixer is broken | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-250385@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/19059
Author: mvorisek
### Description
The following code:
config: https://github.com/atk4/data/blob/dbfe7b5b546df2127a2c6ca209595ff7c29db7a0/.php-cs-fixer.dist.php
code: https://github.com/atk4/data/blob/dbfe7b5b546df2127a2c6ca209595ff7c29db7a0/tests/Ssh/ForUpdateLocking/Test.php
Resulted in this output:
```
Files that were not fixed due to errors reported during fixing:
1) C:\...\tests\Ssh\ForUpdateLocking\Test.php
[AssertionError]
assert(false !== $iToMove) (1)
assert()
in
C:\...\vendor\friendsofphp\php-cs-fixer\src\Fixer\PhpUnit\PhpUnitDataProviderMethodOrderFixer.php at
line 201
PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderMethodOrderFixer->moveMethodElement()
in
C:\...\vendor\friendsofphp\php-cs-fixer\src\Fixer\PhpUnit\PhpUnitDataProviderMethodOrderFixer.php at
line 133
PhpCsFixer\Fixer\PhpUnit\PhpUnitDataProviderMethodOrderFixer->applyPhpUnitClassFix()
in C:\...\vendor\friendsofphp\php-cs-fixer\src\Fixer\AbstractPhpUnitFixer.php at line 47
PhpCsFixer\Fixer\AbstractPhpUnitFixer->applyFix()
in C:\...\vendor\friendsofphp\php-cs-fixer\src\AbstractFixer.php at line 54
PhpCsFixer\AbstractFixer->fix()
in C:\...\vendor\friendsofphp\php-cs-fixer\src\Runner\Runner.php at line 444
PhpCsFixer\Runner\Runner->fixFile()
in C:\...\vendor\friendsofphp\php-cs-fixer\src\Runner\Runner.php at line 385
PhpCsFixer\Runner\Runner->fixSequential()
in C:\...\vendor\friendsofphp\php-cs-fixer\src\Runner\Runner.php at line 173
PhpCsFixer\Runner\Runner->fix()
in C:\...\vendor\friendsofphp\php-cs-fixer\src\Console\Command\FixCommand.php at line 366
PhpCsFixer\Console\Command\FixCommand->execute()
in C:\...\vendor\symfony\console\Command\Command.php at line 298
[ ... ]
```
### PHP Version
```plain
PHP 8.3.22 (cli) (built: Jul 1 2025 04:45:01) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.22, Copyright (c) Zend Technologies
with Zend OPcache v8.3.22, Copyright (c), by Zend Technologies
```
### Operating System
Linux and Windows