Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File can not be opened when parent class uses anonymous class #917

Closed
gharlan opened this issue Apr 19, 2017 · 1 comment
Closed

File can not be opened when parent class uses anonymous class #917

gharlan opened this issue Apr 19, 2017 · 1 comment

Comments

@gharlan
Copy link

gharlan commented Apr 19, 2017

I found a minimal setup to reproduce the bug:

File foo.php:

<?php

class Foo
{
    protected $x;

    public function __construct()
    {
        $this->x = new class() {

        };
    }
}

File bar.php:

<?php

class Bar extends Foo
{
    public function baz()
    {
        $this->x->baz('');
    }
}

File bar.php can not be opened, nothing happen. The string parameter for baz('') is important, without this parameter, or with another parameter type like int, the file can be opened.

PhpStorm 2017.1.2; PS-171.4249.3

@gharlan
Copy link
Author

gharlan commented Mar 18, 2025

I cannot reproduce it with current versions.

@gharlan gharlan closed this as completed Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant