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

Proposed syntax to document the execution lifetime of callable parameters #10914

Open
stof opened this issue Apr 18, 2024 · 1 comment
Open

Comments

@stof
Copy link
Contributor

stof commented Apr 18, 2024

phpstan 1.11.x is adding new phpdoc tags to document the execution lifetime of callable parameters. See https://phpstan.org/writing-php-code/phpdocs-basics#callables for the documentation about them.

symfony/symfony#54654 (comment) also gives some background about why they have been added.

I'd like to have the Psalm opinion over those tags:

  • does Psalm envision a need for such feature in Psalm ?
  • if the answer is yes, is Psalm OK with the syntax defined in phpstan 1.11.x ? If no, what would be a suggested syntax (that phpstan might maybe adopt) ?

As a user of those tools and a maintainer of open-source package, I'm interested in seeing whether we might face interoperability issues if similar features gets implemented with different syntax (meaning my main worry is the case where the answers are "yes" for the first question and "no" for the second one).

Copy link

Hey @stof, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug.

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