Skip to content

Generated stub file too large for PHPStorm to read with default settings #459

@bdsl

Description

@bdsl

In my installation wordpress-stubs.php is 5.1M and it doesn't seem that any of the functions it defines are being indexed by PhpStorm, so it doesn't help with code completion. When I use them in an environment where I don't have an actual copy of the Wordpress codebase available I still get "Undefined function" errors in the editor.

I think this may be because PHPStorm by default refuses to index contents of files over 2.5M long - see https://stackoverflow.com/questions/60240797/phpstorm-isnt-doing-code-completion-with-large-file although it's possible that's out of date as it is an old question.

Could this library output multiple files to stay well clear of that 2.5M limit instead of one big one? If people think it's a good idea I can try to implement that. Not sure if that will need changes at https://github.com/php-stubs/generator or the issue should be there instead of here to apply to multiple stub projects?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions