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 e6d949b

Browse filesBrowse files
minor #24604 Fix deprecation triggering test deduction (alexpott)
This PR was merged into the 3.3 branch. Discussion ---------- Fix deprecation triggering test deduction | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget to update UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> <!-- - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the 3.4, legacy code removals go to the master branch. - Please fill in this template according to the PR you're about to submit. - Replace this comment by a description of what your PR is solving. --> This PR is just testing some additions #24597 - I want to see if the travis run is successful. Commits ------- 5333680 Fix review points
2 parents 8984260 + 5333680 commit e6d949b
Copy full SHA for e6d949b

File tree

1 file changed

+6
-0
lines changed
Filter options

1 file changed

+6
-0
lines changed

‎src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,12 @@ public function handleError($type, $msg, $file, $line, $context = array())
326326

327327
return $h ? $h($type, $msg, $file, $line, $context) : false;
328328
}
329+
// If the message is serialized we need to extract the message. This occurs when the error is triggered by
330+
// by the isolated test path in \Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait::endTest().
331+
$parsedMsg = @unserialize($msg);
332+
if (is_array($parsedMsg)) {
333+
$msg = $parsedMsg['deprecation'];
334+
}
329335
if (error_reporting()) {
330336
$msg = 'Unsilenced deprecation: '.$msg;
331337
}

0 commit comments

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