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

Appearance settings

Commit 9d79113

Browse filesBrowse files
committed
bug #30437 [Debug] detect annotations before blank docblock lines (xabbuh)
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 in df1d50d for #29920. Commits ------- dedd526 detect annotations before blank docblock lines
2 parents e3c0878 + dedd526 commit 9d79113
Copy full SHA for 9d79113

File tree

Expand file treeCollapse file tree

2 files changed

+1
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+1
-2
lines changed

‎src/Symfony/Component/Debug/DebugClassLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/DebugClassLoader.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
233233
// Detect annotations on the class
234234
if (false !== $doc = $refl->getDocComment()) {
235235
foreach (['final', 'deprecated', 'internal'] as $annotation) {
236-
if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) {
236+
if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$|\r?\n)#s', $doc, $notice)) {
237237
self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : '';
238238
}
239239
}

‎src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/Tests/Fixtures/FinalClasses.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ class FinalClass6
6464
* @author John Doe
6565
*
6666
* @final another
67-
*
6867
* multiline comment...
6968
*
7069
* @return string

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.