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

[Debug] detect annotations before blank docblock lines#30437

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:3.4fromxabbuh:pr-29920
Mar 4, 2019

Conversation

@xabbuh
Copy link
Member

@xabbuhxabbuh commentedMar 4, 2019
edited
Loading

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

This fixes the tests and a small issue after the CS changes made indf1d50d for#29920.

if (false !==$doc =$refl->getDocComment()) {
foreach (['final','deprecated','internal']as$annotation) {
if (false !==\strpos($doc,$annotation) &&preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s',$doc,$notice)) {
if (false !==\strpos($doc,$annotation) &&preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$|\r?\n)#s',$doc,$notice)) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

detects blank lines after@final/@deprecated/@internal annotations (detected by the fixtures update made indf1d50d)

* @author John Doe
*
* @final another
*
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

this change had to be reverted as otherwise the second line is not part of the multiline comment

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm sorry but isn't it a BC to alter a test case? Those cases were made on purpose. If they don't fit SF CS standard, we better exclude them from the analysis.

Choose a reason for hiding this comment

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

BC breaks relate to the interface, here it's a behavior change :) - considered a bug fix.
If you don't agree, can you find some kind of "proof" that blank lines in multi line comments are "legal"?

Copy link
Contributor

@fancywebfancywebMar 4, 2019
edited
Loading

Choose a reason for hiding this comment

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

I'm thinking of the case where you use the component outside of SF framework ofc.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry@nicolas-grekas, wrote my last message without seeing yours. I don't have any proof. Just that if we can support more cases, why wouldn't we do it? I tried to support as many cases as possible when I did this so let's keep it that way and ignore those fixtures files in CS checks instead?

Copy link
Member

Choose a reason for hiding this comment

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

It's not related to Symfony. If phpdocs do not support a blank line in multiline comments, we must not support it either.

Copy link
Contributor

Choose a reason for hiding this comment

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

The problem with PHPDoc is that it's not clear at all on edge cases... Since I didn't find an example on the website that have a multiline comment with a blank line, I guess you are right. We can keep it like this 😄

xabbuh reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Thank you for the feedback@fancyweb!

@xabbuh
Copy link
MemberAuthor

the failure is unrelated

@fabpot
Copy link
Member

Thank you@xabbuh.

@fabpotfabpot merged commitdedd526 intosymfony:3.4Mar 4, 2019
fabpot added a commit that referenced this pull requestMar 4, 2019
…bbuh)This PR was merged into the 3.4 branch.Discussion----------[Debug] detect annotations before blank docblock lines| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |This fixes the tests and a small issue after the CS changes made indf1d50d for#29920.Commits-------dedd526 detect annotations before blank docblock lines
@xabbuhxabbuh deleted the pr-29920 branchMarch 4, 2019 11:51
nicolas-grekas added a commit that referenced this pull requestMar 7, 2019
…k docblock lines on final and internal methods (fancyweb)This PR was merged into the 3.4 branch.Discussion----------[Debug][DebugClassLoader] Detect annotations before blank docblock lines on final and internal methods| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -@xabbuh Follow up of#30437Commits-------e97ea77 [Debug][DebugClassLoader] Detect annotations before blank docblock lines on final and internal methods
This was referencedApr 2, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

+1 more reviewer

@fancywebfancywebfancyweb left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

5 participants

@xabbuh@fabpot@nicolas-grekas@fancyweb@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp