driade / phpfmt8

PHP formatter for Sublime Text 4, with PHP 8 support.
BSD 3-Clause "New" or "Revised" License
47 stars 2 forks source link

Critical: `rewinddir` is completely different function from `rewind` and definitely not its alias #80

Closed nekromoff closed 3 months ago

nekromoff commented 3 months ago

fmt.stub.php line 6820:

            'rewind' => 'rewinddir',

rewind

(PHP 4, PHP 5, PHP 7, PHP 8) rewind — Rewind the position of a file pointer

rewinddir

(PHP 4, PHP 5, PHP 7, PHP 8) rewinddir — Rewind directory handle

Solution

Needs to be removed from the stub file. Once removed, the replacement does not happen with "AliasToMaster".

Otherwise CRITICAL code breaking happens.

driade commented 3 months ago

Thank you @nekromoff , fixed and released!