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

[Feature] Working with php stubs #2979

Open
zbigniew-malcherczyk-tg opened this issue Dec 2, 2024 · 0 comments
Open

[Feature] Working with php stubs #2979

zbigniew-malcherczyk-tg opened this issue Dec 2, 2024 · 0 comments

Comments

@zbigniew-malcherczyk-tg
Copy link

Describe the feature you'd like

This issue relates to #2931

Hello! Thank you for creating the stubs available in a single file. I checked it out and can bring some more input to improve the situation.

The ideal scenario for the phpstan is to have multiple stub files. It's not like I thought it would be best for the DX to have a single file. For some reason, phpstan is unable to process them all and it's getting stuck often using a tremendous amount of memory.

I would like to propose a couple of changes.

  1. Keep all the stubs per class/interface stub file
  2. Pack all the stub files as zip and keep them in release artefacts
  3. Add documentation that would help use the stubs. That is
parameters:
    stubFiles:
        - vendor/datadog/dd-trace/src/ddtrace_php_ClassNameOne.stub.php
        - vendor/datadog/dd-trace/src/ddtrace_php_ClassNameThree.stub.php
        - vendor/datadog/dd-trace/src/ddtrace_php_ClassNameOne.stub.php

I believe a great example could the the phpstan symfony extension (https://github.com/phpstan/phpstan-symfony/tree/2.0.x/stubs)

Is your feature request related to a problem?

No response

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant