Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[PropertyInfo] MakePhpDocExtractor::getDocBlock() public#52632
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
stof commentedNov 17, 2023
As this method does returns a shape with 3 info and not just the docblock, I would not make it public. I don't think we want to provide BC for the current API. |
Nyholm commentedNov 17, 2023
Good point. |
ro0NL commentedNov 17, 2023
I think because it's not a component responsibility, as per current contracts. |
Nyholm commentedNov 17, 2023
Hm.. Im not sure I agree with that. You could expect the "property info" component to be able to extract the Doc Block of a property. Or maybe I misunderstand you. Are you suggesting I should introduce a proper interface for this method? |
ro0NL commentedNov 17, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Shouldn't you be usinghttps://github.com/phpDocumentor/ReflectionDocBlock instead? |
ro0NL commentedNov 17, 2023
Yes, but there's no real contract for it currently |
Nyholm commentedNov 18, 2023
I looked into that. But I do like the feature from PropertyInfo component that would find where the docblock is. Ie, if the property is not documented it goes to the mutator. I'll make sure to prepare a proper contract and prepare this PR. |
Nyholm commentedNov 19, 2023
I've updated the PR with a proper interface and a good return value. |
src/Symfony/Component/PropertyInfo/PropertyDocBlockExtractorInterface.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/PropertyInfo/PropertyDocBlockExtractorInterface.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Nyholm commentedNov 23, 2023
Thank you for the reviews. I've updated according to the suggestions. |
PhpDocExtractor::getDocBlock() publicPhpDocExtractor::getDocBlock() publicPhpDocExtractor::getDocBlock() publicUh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/PropertyInfo/PropertyDocBlockExtractorInterface.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
OskarStark left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Some comments
fabpot commentedDec 4, 2023
Thank you@Nyholm. |
Im parsing properties and I would love to find out what is in the doc block for a property.
Help me figure out why it would be a bad idea to make this method public.