View Issue Details

IDProjectCategoryView StatusLast Update
0002063XdebugStep Debuggingpublic2022-04-04 11:32
Reporterhacfi Assigned Toderick  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version3.1.2 
Target Version3.1devFixed in Version3.1.4 
Summary0002063: Can't inspect ArrayObject storage elements
Description

When working with the ecommerce platform Spryker the contents of ArrayObjects can't be viewed in PhpStorm. ArrayObject is widely used in Spryker and the only way to view the data currently is using "Evaluate expression" and then call "->getArrayCopy();" on the ArrayObject.

Steps To Reproduce

Follow Spryker's installation guide at https://docs.spryker.com/docs/scos/dev/setup/installing-spryker-with-docker/installation-guides/installing-in-development-mode-on-macos-and-linux.html#installing-docker-prerequisites-on-macos-and-linux and either set up the b2b or b2c suite.

TagsNo tags attached.
Attached Files
Operating SystemmacOS but I know it's the same issue on Ubuntu
PHP Version7.4.20-7.4.29

Activities

derick

2022-02-18 14:42

administrator   ~0006202

Hi,

Installing and learning a whole new platform is not a reasonable ask to try to reproduce a bug.

Please provide a short reproducible scripts as is explained at http://xdebug.org/reporting-bugs

cheers
Derick

hacfi

2022-02-18 14:56

reporter   ~0006203

Thanks, will provide a reproducible script next week!

derick

2022-02-21 10:06

administrator   ~0006205

Moving this back to feedback until I see the short reproducible script.

hacfi

2022-02-27 09:11

reporter   ~0006222

This small script should make it reproduccible. I thought it was only an issue with PHP 7.4 but just noticed it also affects PHP 8.0.

test.php (581 bytes)   
<?php

class Container
{
    /**
     * @var \ArrayObject
     */
    protected $permissions;

    public function __construct()
    {
        $this->permissions = $this->permissions ?: new ArrayObject();
    }

    public function addPermission(Permission $permission)
    {
        $this->permissions->append($permission);
    }
}

class Permission
{
    private $id;

    public function __construct($id)
    {
        $this->id = $id;
    }
}

$container = new Container();
$container->addPermission(new Permission(1));
$container->addPermission(new Permission(2));
$stop = 1;
test.php (581 bytes)   

derick

2022-03-07 19:12

administrator   ~0006234

I've confirmed this, with an even much smaller test script:

<?php
$permissions = new ArrayObject();
$permissions->append(1);
$stop = 1;

With the breakpoint on the $stop = 1; line.

derick

2022-03-09 15:14

administrator   ~0006237

https://github.com/xdebug/xdebug/pull/826

Issue History

Date Modified Username Field Change
2022-02-18 13:33 hacfi New Issue
2022-02-18 13:33 hacfi File Added: Screenshot 2022-02-18 at 14.12.26.jpg
2022-02-18 14:42 derick Assigned To => derick
2022-02-18 14:42 derick Status new => feedback
2022-02-18 14:42 derick Note Added: 0006202
2022-02-18 14:56 hacfi Note Added: 0006203
2022-02-18 14:56 hacfi Status feedback => assigned
2022-02-21 10:06 derick Status assigned => feedback
2022-02-21 10:06 derick Note Added: 0006205
2022-02-27 09:11 hacfi Note Added: 0006222
2022-02-27 09:11 hacfi File Added: Screenshot 2022-02-27 at 10.01.57.png
2022-02-27 09:11 hacfi File Added: test.php
2022-02-27 09:11 hacfi Status feedback => assigned
2022-03-07 19:12 derick Status assigned => confirmed
2022-03-07 19:12 derick Note Added: 0006234
2022-03-09 15:14 derick Target Version => 3.1dev
2022-03-09 15:14 derick Summary ArrayObject storage elements not viewable in PhpStorm => Can't inspect ArrayObject storage elements
2022-03-09 15:14 derick Note Added: 0006237
2022-03-09 15:59 derick Status confirmed => resolved
2022-03-09 15:59 derick Resolution open => fixed
2022-03-09 15:59 derick Fixed in Version => 3.1dev
2022-04-04 11:32 derick Status resolved => closed
2022-04-04 11:32 derick Fixed in Version 3.1dev => 3.1.4