You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When run tests on latest PHPUnit 11.0.3 with latest mockery version the results return deprecation messages about using annotations and this support will be drop in PHPUnit 12
Steps to Reproduce
Run tests on latest stable PHPUnit will return on each tests when is mockery used
1) Metadata found in doc-comment for method App\Tests\SomeTest::startMockery(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.
2) Metadata found in doc-comment for method App\Tests\SomeTest::purgeMockeryContainer(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.
Expected Behavior
no deprecations
Actual Behavior
No response
Exception or Error
No response
Additional Information
Is all about @before and @after annotations.. for example this on line 62 in MockeryPHPUnitIntegration.php
/**
* @before
*/
protected function startMockery()
{
$this->mockeryOpen = true;
}
/**
* @after
*/
protected function purgeMockeryContainer()
{
if ($this->mockeryOpen) {
// post conditions wasn't called, so test probably failed
Mockery::close();
}
}
The text was updated successfully, but these errors were encountered:
ghostwriter
added
Chore
for non-functional changes or maintenance tasks such as code cleanup, formatting, or dependency upda
and removed
triage
needs to be triaged
labels
Feb 22, 2024
Fixesmockery#1359
While upgrading to PHPUnit 11 I noticed the following deprecation:
Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12.
Update your test code to use attributes instead.
If we add the attribute too, it stops complaining. So this most be a way to support PHPUnit 11
and older versions.
If we ship this, we reduce a few errors. Most of the things just work fine.
Mockery Version
1.6.7
PHP Version
PHP 8.3
Issue Description
When run tests on latest PHPUnit 11.0.3 with latest mockery version the results return deprecation messages about using annotations and this support will be drop in PHPUnit 12
Steps to Reproduce
Run tests on latest stable PHPUnit will return on each tests when is mockery used
Expected Behavior
no deprecations
Actual Behavior
No response
Exception or Error
No response
Additional Information
Is all about
@before
and@after
annotations.. for example this on line 62 in MockeryPHPUnitIntegration.phpThe text was updated successfully, but these errors were encountered: