-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PhpUnitBridge] Add ExpectUserDeprecationMessageTrait
#54593
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Bridge\PhpUnit; | ||
|
||
use PHPUnit\Runner\Version; | ||
|
||
if (version_compare(Version::id(), '11.0.0', '<')) { | ||
trait ExpectUserDeprecationMessageTrait | ||
{ | ||
use ExpectDeprecationTrait; | ||
|
||
final protected function expectUserDeprecationMessage(string $expectedUserDeprecationMessage): void | ||
{ | ||
$this->expectDeprecation($expectedUserDeprecationMessage); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Be careful. The PHPUnit 11 API performs an exact match of the deprecation message. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way to escape those placeholders? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can escape by doubling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, I replace all There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it should, yes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
} | ||
} else { | ||
trait ExpectUserDeprecationMessageTrait | ||
Check failure on line 27 in src/Symfony/Bridge/PhpUnit/ExpectUserDeprecationMessageTrait.php
|
||
{ | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.