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

Explain once and for all the use of StaticPropertyMetadata #1118

Merged
merged 1 commit into from
Aug 23, 2019

Conversation

goetas
Copy link
Collaborator

@goetas goetas commented Aug 23, 2019

Q A
Bug fix? no
New feature? no
Doc updated yes
BC breaks? no
Deprecations? no
Tests pass? yes/no
Fixed tickets -
License MIT

This tries to solve once and for all what has been attempted in #1117 #1107 and #1107

Also reported in #1116 #1030

The value has to be specified twice. The first for the actual value, the second is for nullability checks and type auto detection.

The value has to be specified twice. The first for the actual value, the second is for nullability checks and type auto detection.
@@ -166,7 +166,7 @@ public function hasData(string $key): bool
}

/**
* @deprecated Use visitProperty(new StaticPropertyMetadata(null, 'name', 'value'), null) instead
* @deprecated Use `::visitProperty(new StaticPropertyMetadata(null, 'name', 'value'), 'value')` instead

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first argument here is still null though which will cause the type checking in PHP 7 to fail again

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, fixed in 80aec06

@goetas goetas deleted the static-prop-documentation branch August 23, 2019 14:13
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

Successfully merging this pull request may close these issues.

2 participants