8000 minor #40309 Fix deprecation messages (rosier) · symfony/symfony@64b7696 · GitHub
[go: up one dir, main page]

Skip to content

Commit 64b7696

Browse files
committed
minor #40309 Fix deprecation messages (rosier)
This PR was squashed before being merged into the 5.3-dev branch. Discussion ---------- Fix deprecation messages | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | yes | New feature? | no | Deprecations? | yes | Tickets | - | License | MIT | Doc PR | - The wrong namespace is used in the deprecation messages Commits ------- 4aca3ed Fix deprecation messages
2 parents d9dedb4 + 4aca3ed commit 64b7696

13 files changed

+30
-32
lines changed

src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Symfony\Component\Security\Core\Encoder;
1313

14-
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', BasePasswordEncoder::class, CheckPasswordLengthTrait::class));
15-
1614
use Symfony\Component\PasswordHasher\Hasher\CheckPasswordLengthTrait;
1715

16+
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', BasePasswordEncoder::class, CheckPasswordLengthTrait::class));
17+
1818
/**
1919
* BasePasswordEncoder is the base class for all password encoders.
2020
*

src/Symfony/Component/Security/Core/Encoder/EncoderFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
namespace Symfony\Component\Security\Core\Encoder;
1313

14-
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', EncoderFactory::class, PasswordHasherFactory::class));
15-
16-
use Symfony\Component\Security\Core\Exception\LogicException;
1714
use Symfony\Component\PasswordHasher\Hasher\PasswordHasherAwareInterface;
1815
use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactory;
16+
use Symfony\Component\Security\Core\Exception\LogicException;
17+
18+
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', EncoderFactory::class, PasswordHasherFactory::class));
1919

2020
/**
2121
* A generic encoder factory implementation.

src/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Symfony\Component\Security\Core\Encoder;
1313

14-
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', EncoderFactoryInterface::class, PasswordHasherFactoryInterface::class));
15-
16-
use Symfony\Component\Security\Core\User\UserInterface;
1714
use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface;
15+
use Symfony\Component\Security\Core\User\UserInterface;
16+
17+
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', EncoderFactoryInterface::class, PasswordHasherFactoryInterface::class));
1818

1919
/**
2020
* EncoderFactoryInterface to support different encoders for different accounts.

src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Symfony\Component\Security\Core\Encoder;
1313

14-
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', MessageDigestPasswordEncoder::class, MessageDigestPasswordHasher::class));
15-
1614
use Symfony\Component\PasswordHasher\Hasher\MessageDigestPasswordHasher;
1715

16+
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', MessageDigestPasswordEncoder::class, MessageDigestPasswordHasher::class));
17+
1818
/**
1919
* MessageDigestPasswordEncoder uses a message digest algorithm.
2020
*

src/Symfony/Component/Security/Core/Encoder/MigratingPasswordEncoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Symfony\Component\Security\Core\Encoder;
1313

14-
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', MigratingPasswordEncoder::class, MigratingPasswordHasher::class));
15-
1614
use Symfony\Component\PasswordHasher\Hasher\MigratingPasswordHasher;
1715

16+
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', MigratingPasswordEncoder::class, MigratingPasswordHasher::class));
17+
1818
/**
1919
* Hashes passwords using the best available encoder.
2020
* Validates them using a chain of encoders.

src/Symfony/Component/Security/Core/Encoder/NativePasswordEncoder.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
1111

1212
namespace Symfony\Component\Security\Core\Encoder;
1313

14-
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', NativePasswordEncoder::class, NativePasswordHasher::class));
15-
16-
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
1714
use Symfony\Component\PasswordHasher\Hasher\NativePasswordHasher;
1815

16+
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', NativePasswordEncoder::class, NativePasswordHasher::class));
17+
1918
/**
2019
* Hashes passwords using password_hash().
2120
*

src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Symfony\Component\Security\Core\Encoder;
1313

14-
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', PasswordEncoderInterface::class, PasswordHasherInterface::class));
15-
16-
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
1714
use Symfony\Component\PasswordHasher\PasswordHasherInterface;
15+
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
16+
17+
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', PasswordEncoderInterface::class, PasswordHasherInterface::class));
1818

1919
/**
2020
* PasswordEncoderInterface is the interface for all encoders.

src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
1111

1212
namespace Symfony\Component\Security\Core\Encoder;
1313

14-
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', Pbkdf2PasswordEncoder::class, Pbkdf2PasswordHasher::class));
15-
16-
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
1714
use Symfony\Component\PasswordHasher\Hasher\Pbkdf2PasswordHasher;
1815

16+
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', Pbkdf2PasswordEncoder::class, Pbkdf2PasswordHasher::class));
17+
1918
/**
2019
* Pbkdf2PasswordEncoder uses the PBKDF2 (Password-Based Key Derivation Function 2).
2120
*

src/Symfony/Component/Security/Core/Encoder/PlaintextPasswordEncoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Symfony\Component\Security\Core\Encoder;
1313

14-
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', PlaintextPasswordEncoder::class, PlaintextPasswordHasher::class));
15-
1614
use Symfony\Component\PasswordHasher\Hasher\PlaintextPasswordHasher;
1715

16+
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" class is deprecated, use "%s" instead.', PlaintextPasswordEncoder::class, PlaintextPasswordHasher::class));
17+
1818
/**
1919
* PlaintextPasswordEncoder does not do any encoding but is useful in testing environments.
2020
*

src/Symfony/Component/Security/Core/Encoder/SelfSaltingEncoderInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Symfony\Component\Security\Core\Encoder;
1313

14-
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" interface is deprecated, use "%s" on hasher implementations that deal with salts instead.', SelfSaltingEncoderInterface::class, LegacyPasswordHasherInterface::class));
15-
1614
use Symfony\Component\PasswordHasher\LegacyPasswordHasherInterface;
1715

16+
trigger_deprecation('symfony/security-core', '5.3', sprintf('The "%s" interface is deprecated, use "%s" on hasher implementations that deal with salts instead.', SelfSaltingEncoderInterface::class, LegacyPasswordHasherInterface::class));
17+
1818
/**
1919
* SelfSaltingEncoderInterface is a marker interface for encoders that do not
2020
* require a user-generated salt.

0 commit comments

Comments
 (0)
0