Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd08301

Browse files
committed
fix tests that are no longer valid with PHP >= 8.2.18/8.3.5
1 parent a0deee5 commit bd08301

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ public function testBcryptWithLongPassword()
100100

101101
public function testBcryptWithNulByte()
102102
{
103+
if (\PHP_VERSION_ID >= 80218 && \PHP_VERSION_ID < 80300 || \PHP_VERSION_ID > 80305) {
104+
$this->markTestSkipped('password_hash() does not accept plain passwords containing null bytes since PHP 8.2.18 and 8.3.5');
105+
}
106+
103107
$hasher = new NativePasswordHasher(null, null, 4, \PASSWORD_BCRYPT);
104108
$plainPassword = "a\0b";
105109

src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ public function testBcryptWithLongPassword()
7575

7676
public function testBcryptWithNulByte()
7777
{
78+
if (\PHP_VERSION_ID >= 80218 && \PHP_VERSION_ID < 80300 || \PHP_VERSION_ID > 80305) {
79+
$this->markTestSkipped('password_hash() does not accept plain passwords containing null bytes since PHP 8.2.18 and 8.3.5');
80+
}
81+
7882
$hasher = new SodiumPasswordHasher(null, null);
7983
$plainPassword = "a\0b";
8084

0 commit comments

Comments
 (0)