Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:7.1fromNyholm:public-doc-block
Dec 4, 2023

Conversation

@Nyholm
Copy link
Member

QA
Branch?7.1
Bug fix?no
New feature?yes
Deprecations?no
IssuesN/a
LicenseMIT

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.

@stof
Copy link
Member

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
Copy link
MemberAuthor

Good point.
I suggest to create a new public method then with a simpler API. What do you think about that?

@ro0NL
Copy link
Contributor

Help me figure out why it would be a bad idea to make this method public.

I think because it's not a component responsibility, as per current contracts.

@Nyholm
Copy link
MemberAuthor

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
Copy link
Contributor

ro0NL commentedNov 17, 2023
edited
Loading

Shouldn't you be usinghttps://github.com/phpDocumentor/ReflectionDocBlock instead?

@ro0NL
Copy link
Contributor

You could expect the "property info" component to be able to extract the Doc Block of a property

Yes, but there's no real contract for it currently

Nyholm and asrorbekh reacted with thumbs up emoji

@Nyholm
Copy link
MemberAuthor

Shouldn't you be usinghttps://github.com/phpDocumentor/ReflectionDocBlock instead?

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
Copy link
MemberAuthor

I've updated the PR with a proper interface and a good return value.

@Nyholm
Copy link
MemberAuthor

Thank you for the reviews. I've updated according to the suggestions.

@OskarStarkOskarStark changed the titleMake PhpDocExtractor::getDocBlock() publicMakePhpDocExtractor::getDocBlock() publicNov 24, 2023
@carsonbotcarsonbot changed the titleMakePhpDocExtractor::getDocBlock() public[PropertyInfo] MakePhpDocExtractor::getDocBlock() publicNov 24, 2023
Copy link
Contributor

@OskarStarkOskarStark left a comment

Choose a reason for hiding this comment

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

Some comments

@fabpot
Copy link
Member

Thank you@Nyholm.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@dunglasdunglasdunglas approved these changes

@OskarStarkOskarStarkOskarStark approved these changes

@mtarldmtarldmtarld approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

8 participants

@Nyholm@stof@ro0NL@fabpot@dunglas@OskarStark@mtarld@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp