Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 3e3d154

Browse files
committed
removed code for PHP < 5.3.9
1 parent 65288d5 commit 3e3d154

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

Core/Tests/Encoder/BCryptPasswordEncoderTest.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,30 +47,19 @@ public function testCostInRange()
4747

4848
public function testResultLength()
4949
{
50-
$this->skipIfPhpVersionIsNotSupported();
51-
5250
$encoder = new BCryptPasswordEncoder(self::VALID_COST);
5351
$result = $encoder->encodePassword(self::PASSWORD, null);
5452
$this->assertEquals(60, strlen($result));
5553
}
5654

5755
public function testValidation()
5856
{
59-
$this->skipIfPhpVersionIsNotSupported();
60-
6157
$encoder = new BCryptPasswordEncoder(self::VALID_COST);
6258
$result = $encoder->encodePassword(self::PASSWORD, null);
6359
$this->assertTrue($encoder->isPasswordValid($result, self::PASSWORD, null));
6460
$this->assertFalse($encoder->isPasswordValid($result, 'anotherPassword', null));
6561
}
6662

67-
private function skipIfPhpVersionIsNotSupported()
68-
{
69-
if (PHP_VERSION_ID < 50307) {
70-
$this->markTestSkipped('Requires PHP >= 5.3.7');
71-
}
72-
}
73-
7463
/**
7564
* @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException
7665
*/

Core/Util/SecureRandom.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ public function __construct($seedFile = null, LoggerInterface $logger = null)
4343
$this->logger = $logger;
4444

4545
// determine whether to use OpenSSL
46-
if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID < 50304) {
47-
$this->useOpenSsl = false;
48-
} elseif (!function_exists('openssl_random_pseudo_bytes')) {
46+
if (!function_exists('openssl_random_pseudo_bytes')) {
4947
if (null !== $this->logger) {
5048
$this->logger->notice('It is recommended that you enable the "openssl" extension for random number generation.');
5149
}

0 commit comments

Comments
 (0)