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

ADD: Support for @phpstan-property @phpstan-property-read and @phpstan-property-write #775

Merged
merged 2 commits into from
Nov 22, 2021
Merged

ADD: Support for @phpstan-property @phpstan-property-read and @phpstan-property-write #775

merged 2 commits into from
Nov 22, 2021

Conversation

mad-briller
Copy link
Contributor

Implements issue 6040 in the PHPStan repository.

Adds support for @phpstan-property @phpstan-property-read and @phpstan-property-write in class declarations.

@ondrejmirtes
Copy link
Member

Hi, this needs tests. These tests should make sure that the prefixed tags are read and also test which tags have priority if both are present for the same property name.

@ondrejmirtes
Copy link
Member

You can use NodeScopeResolverTest to add more test files.

@mad-briller
Copy link
Contributor Author

hey @ondrejmirtes, i've added a test file for this addition now, hopefully as you expected, took me a bit to figure out how it worked.

Is there documentation for writing tests anywhere that i missed?

@ondrejmirtes ondrejmirtes merged commit 21e8667 into phpstan:master Nov 22, 2021
@ondrejmirtes
Copy link
Member

Thank you! Testing is described here: https://phpstan.org/developing-extensions/testing

@ZebulanStanphill
Copy link
Contributor

Thanks for working on this. I've been wanting this for a while now. 🎉

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