Skip to content

Commit

Permalink
Merge pull request #608 from alexislefebvre/enable-deprecations
Browse files Browse the repository at this point in the history
enable deprecations (previously commented)
  • Loading branch information
alexislefebvre authored Jan 15, 2023
2 parents 377353a + 863b1c9 commit 1387d94
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Changelog

## 5.0
## 5.0 (to be released)

Removed features deprecated in [4.6](#4.6) and [4.0](#4.0)
Removed features deprecated in [4.6](#4.6)

## 4.7

Expand Down
34 changes: 16 additions & 18 deletions src/Test/WebTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,15 +464,14 @@ public function loginClient(KernelBrowser $client, UserInterface $user, string $
{
// Available since Symfony 5.1
if (method_exists($client, 'loginUser')) {
// TODO: enable this on the next minor release
// @trigger_error(
// sprintf(
// '"%s()" is deprecated, use loginUser() from Symfony 5.1+ instead %s',
// __METHOD__,
// 'https://symfony.com/doc/5.4/testing.html#logging-in-users-authentication'
// ),
// \E_USER_DEPRECATED
// );
@trigger_error(
sprintf(
'"%s()" is deprecated, use loginUser() from Symfony 5.1+ instead %s',
__METHOD__,
'https://symfony.com/doc/5.4/testing.html#logging-in-users-authentication'
),
\E_USER_DEPRECATED
);

$client->loginUser($user);

Expand Down Expand Up @@ -572,15 +571,14 @@ protected function createClientWithParams(array $params, ?string $username = nul

// Available since Symfony 5.1
if (method_exists($client, 'loginUser')) {
// TODO: enable this on the next minor release
// @trigger_error(
// sprintf(
// '"%s()" is deprecated, use loginUser() from Symfony 5.1+ instead %s',
// __METHOD__,
// 'https://symfony.com/doc/5.4/testing.html#logging-in-users-authentication'
// ),
// \E_USER_DEPRECATED
// );
@trigger_error(
sprintf(
'"%s()" is deprecated, use loginUser() from Symfony 5.1+ instead %s',
__METHOD__,
'https://symfony.com/doc/5.4/testing.html#logging-in-users-authentication'
),
\E_USER_DEPRECATED
);

$client->loginUser($user);

Expand Down

0 comments on commit 1387d94

Please sign in to comment.