View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002131 | Xdebug | Step Debugging | public | 2022-10-28 10:22 | 2022-11-02 16:38 |
Reporter | moises_flowize | Assigned To | derick | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Platform | Ubuntu over WSL | OS | Windows | OS Version | 10 |
Product Version | 3.1.5 | ||||
Summary | 0002131: Internal pointer of SplFileObject is modified for every "Step Over" | ||||
Description | The debugger is updating the internal pointer of a SplFileObjectfor every "step over" after opening the file. | ||||
Steps To Reproduce | $file_stream = new SplFileObject('/home/my-file.csv', 'rb'); echo $file_stream->current(); If you stop at the breakpoint after opening the file, every time you execute a "Step over" it will move the internal pointer, and it will output a different line. | ||||
Tags | php8.0, PHPStorm, SPL | ||||
Attached Files | |||||
Operating System | UBuntu run over WSL in Windows 10 | ||||
PHP Version | 8.0.20-8.0.29 | ||||
|
Thanks for your report, I'll have a look at at later time. It would not surprise me if this is actually a bug in Spl, where it advances when it shouldn't though. |
|
Hi, as expected, this is a bug in Spl. It advances the file pointer when you call __toString. The following script (not run with the debugger), also shows this problem:
This bug gets triggered because PhpStorm 2022.2 has a new As this is not a bug in Xdebug, I am closing this ticket. cheers, |
|
Apparently this is not a bug in Spl either, but a "feature": https://www.php.net/manual/en/splfileobject.tostring.php — I'll make a ticket with PhpStorm, to turn this off for SplFileObject. |
|
https://youtrack.jetbrains.com/issue/WI-69513/toString-object-view-causes-reads-with-SplFileObject |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-10-28 10:22 | moises_flowize | New Issue | |
2022-10-28 10:22 | moises_flowize | Tag Attached: php8.0 | |
2022-10-28 10:22 | moises_flowize | Tag Attached: PHPStorm | |
2022-10-28 10:22 | moises_flowize | Tag Attached: SPL | |
2022-10-28 10:22 | moises_flowize | File Added: xdebub-bug.png | |
2022-10-28 10:22 | moises_flowize | File Added: xdebub-bug2.png | |
2022-10-31 10:03 | derick | Assigned To | => derick |
2022-10-31 10:03 | derick | Status | new => acknowledged |
2022-10-31 10:03 | derick | Note Added: 0006416 | |
2022-11-02 16:22 | derick | Status | acknowledged => resolved |
2022-11-02 16:22 | derick | Resolution | open => no change required |
2022-11-02 16:22 | derick | Note Added: 0006425 | |
2022-11-02 16:29 | derick | Note Added: 0006427 | |
2022-11-02 16:38 | derick | Note Added: 0006429 |