Skip to content

Commit d5ac2be

Browse files
authored
Merge pull request #759 from cakephp/deprecations
Fix deprecation errors
2 parents acdcdf9 + e69a5bb commit d5ac2be

14 files changed

+47
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"cakephp/cakephp": "^5.1.0",
3636
"cakephp/cakephp-codesniffer": "^5.0",
3737
"firebase/php-jwt": "^6.2",
38-
"phpunit/phpunit": "^10.5.32 || ^11.3.3 || ^12.0.9"
38+
"phpunit/phpunit": "^10.5.58 || ^11.5.3 || ^12.4"
3939
},
4040
"suggest": {
4141
"ext-ldap": "Make sure this php extension is installed and enabled on your system if you want to use the built-in LDAP adapter for \"LdapIdentifier\".",

tests/TestCase/AuthenticationServiceTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@
3434
use Cake\I18n\DateTime;
3535
use Cake\Routing\Router;
3636
use InvalidArgumentException;
37+
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
3738
use PHPUnit\Runner\Version;
3839
use Psr\Http\Message\RequestInterface;
3940
use Psr\Http\Message\ResponseInterface;
4041
use Psr\Http\Message\ServerRequestInterface;
4142
use stdClass;
4243

44+
#[AllowMockObjectsWithoutExpectations]
4345
class AuthenticationServiceTest extends TestCase
4446
{
4547
/**

tests/TestCase/Authenticator/AbstractAuthenticatorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
use Authentication\Authenticator\ResultInterface;
2222
use Authentication\Identifier\IdentifierInterface;
2323
use Authentication\Test\TestCase\AuthenticationTestCase as TestCase;
24+
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
2425

26+
#[AllowMockObjectsWithoutExpectations]
2527
class AbstractAuthenticatorTest extends TestCase
2628
{
2729
/**

tests/TestCase/Authenticator/AuthenticatorCollectionTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
use Authentication\Authenticator\FormAuthenticator;
2222
use Authentication\Identifier\IdentifierCollection;
2323
use Cake\TestSuite\TestCase;
24+
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
2425

26+
#[AllowMockObjectsWithoutExpectations]
2527
class AuthenticatorCollectionTest extends TestCase
2628
{
2729
/**

tests/TestCase/Authenticator/EnvironmentAuthenticatorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
use Authentication\Test\TestCase\AuthenticationTestCase as TestCase;
2323
use Cake\Http\ServerRequestFactory;
2424
use Cake\Routing\Router;
25+
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
2526
use RuntimeException;
2627

28+
#[AllowMockObjectsWithoutExpectations]
2729
class EnvironmentAuthenticatorTest extends TestCase
2830
{
2931
/**

tests/TestCase/Authenticator/FormAuthenticatorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
use Authentication\Test\TestCase\AuthenticationTestCase as TestCase;
2323
use Cake\Http\ServerRequestFactory;
2424
use Cake\Routing\Router;
25+
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
2526
use RuntimeException;
2627

28+
#[AllowMockObjectsWithoutExpectations]
2729
class FormAuthenticatorTest extends TestCase
2830
{
2931
/**

tests/TestCase/Controller/Component/AuthenticationComponentTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@
3434
use Cake\ORM\Entity;
3535
use Cake\Routing\Router;
3636
use InvalidArgumentException;
37+
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
3738
use TestApp\Authentication\InvalidAuthenticationService;
3839
use UnexpectedValueException;
3940

4041
/**
4142
* Authentication component test.
4243
*/
44+
#[AllowMockObjectsWithoutExpectations]
4345
class AuthenticationComponentTest extends TestCase
4446
{
4547
/**

tests/TestCase/Identifier/IdentifierCollectionTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
use Authentication\Identifier\IdentifierInterface;
2121
use Authentication\Identifier\PasswordIdentifier;
2222
use Authentication\Test\TestCase\AuthenticationTestCase as TestCase;
23+
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
2324

25+
#[AllowMockObjectsWithoutExpectations]
2426
class IdentifierCollectionTest extends TestCase
2527
{
2628
public function testConstruct()

tests/TestCase/Identifier/LdapIdentifierTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
use Authentication\Identifier\LdapIdentifier;
2323
use Authentication\Test\TestCase\AuthenticationTestCase as TestCase;
2424
use ErrorException;
25+
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
2526
use stdClass;
2627

28+
#[AllowMockObjectsWithoutExpectations]
2729
class LdapIdentifierTest extends TestCase
2830
{
2931
/**

tests/TestCase/Identifier/PasswordIdentifierTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
use Authentication\PasswordHasher\LegacyPasswordHasher;
2424
use Authentication\PasswordHasher\PasswordHasherInterface;
2525
use Authentication\Test\TestCase\AuthenticationTestCase as TestCase;
26+
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
2627

28+
#[AllowMockObjectsWithoutExpectations]
2729
class PasswordIdentifierTest extends TestCase
2830
{
2931
/**

0 commit comments

Comments
 (0)