-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Chore: refactor docblock parsing into a more specific DocBlock
value object with an associated registry
#3836
Chore: refactor docblock parsing into a more specific DocBlock
value object with an associated registry
#3836
Conversation
]; | ||
$recordedOffsets[$matches['name'] . '_constraint'] = $offset; | ||
} catch (\PharIo\Version\Exception $e) { | ||
/* @TODO this catch is currently not valid, see https://github.com/phar-io/version/issues/16 */ |
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.
Codecov Report
@@ Coverage Diff @@
## master #3836 +/- ##
=========================================
Coverage ? 82.96%
Complexity ? 3868
=========================================
Files ? 153
Lines ? 10266
Branches ? 0
=========================================
Hits ? 8517
Misses ? 1749
Partials ? 0
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #3836 +/- ##
===========================================
+ Coverage 82.98% 83.1% +0.12%
- Complexity 3824 3853 +29
===========================================
Files 151 153 +2
Lines 10107 10213 +106
===========================================
+ Hits 8387 8488 +101
- Misses 1720 1725 +5
Continue to review full report at Codecov.
|
Looks like we found a bug in @muglug's Psalm:
https://github.com/sebastianbergmann/phpunit/pull/3836/checks?check_run_id=215062082 |
Possibly
I'll remove the comment, since the file is likely to be only used (and updated) by the tool. |
…alue type This is just demonstrating the feasibility of moving some docblock parsing out of `PHPUnit\Util\Test`, so we can refactor and cache annotation operations where applicable.
This was moved to the new `DocBlock` API.
… ctor Instead, relying on either `ReflectionMethod` or `ReflectionClass` is more than enough.
A TODO has been introduced, but needs phar-io/version#16 to be fixed first.
…et)Tests` parameters These were supposed to be `TestCase` rather than more generic `Test` instances.
…d to overhead Parsing requirements on docblocks seems to be repeated multiple times, so we need to prevent this from being performed more than necessary. The regular expressions around this are quite complex, and therefore there is a performance impact (~2% total runtime on an IO-free test suite).
…s()` This method is used very often (10k+ times in a small test suite), so it needs to be quite efficient, if possible.
…le variadic call
…ToBeCoveredOrUsed()` Replaced by a variadic `array_merge()` call
…e#(get|set)Tests` parameters" This reverts commit 71432bd.
No description provided.