Skip to content

Feature Request: Automate Stub File Generation for Large Codebase with Splitting into Multiple Files #28

@owaisahmed5300

Description

@owaisahmed5300

Currently, the stub generator creates a single file for the entire codebase, which becomes inefficient for larger projects. I request a feature that automatically splits the stub generation into multiple files based on subfolders or another logical structure.

Reason for Request: This request is primarily to improve the performance of static analysis tools such as PHPStan. For projects that rely heavily on stubs, analyzing a single large stub file significantly slows down the analysis process. Splitting the stubs into multiple, smaller files would make it much easier for static analyzers to process and analyze the stubs more efficiently.

Expected Behavior:

The stub generator should automatically detect subfolders and generate separate stub files for each folder (or based on another configurable structure).
The generated stubs should be organized into multiple files, making it easier to manage and allowing static analysis tools like PHPStan to analyze them faster.
Current Behavior:

The generator currently creates a single stub file for the entire codebase, which causes slowdowns when using static analysis tools.

If there’s any other way to achieve a similar result without splitting files, suggestions would also be appreciated!

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