diff options
author | Nicolas Grekas <nicolas.grekas@gmail.com> | 2015-05-15 16:13:55 +0200 |
---|---|---|
committer | Nicolas Grekas <nicolas.grekas@gmail.com> | 2015-05-15 16:13:55 +0200 |
commit | 6ed97b76b3efaf04314def15abefd7e8e284a2d0 (patch) | |
tree | bbc8859d18aee3c4fb90945dbf0ef69cb7a5bf07 /Core | |
parent | be8e01596f133c2c950b011fe8b0e261dc6c6f34 (diff) | |
parent | 34bcfc3debc0b7e1fbc68b1bedf98e21163f4967 (diff) | |
download | symfony-security-6ed97b76b3efaf04314def15abefd7e8e284a2d0.zip symfony-security-6ed97b76b3efaf04314def15abefd7e8e284a2d0.tar.gz symfony-security-6ed97b76b3efaf04314def15abefd7e8e284a2d0.tar.bz2 |
Merge branch '2.7' into 2.8
* 2.7:
fixed CS
fixed CS
fixed CS
Fix WebProfilerBundle compatiblity with HttpKernel < 2.7
[Validator] Deprecated PHP7-incompatible constraints and related validators
[DebugBundle] Allow alternative destination for dumps
[DebugBundle] Use output mechanism of dumpers instead of echoing
[DebugBundle] Always collect dumps
[FrameworkBundle] Applied new styles to the config:debug & config:dump-reference commands
Fix tests in HHVM
CS: Pre incrementation/decrementation should be used if possible
Conflicts:
src/Symfony/Bundle/FrameworkBundle/composer.json
Diffstat (limited to 'Core')
8 files changed, 17 insertions, 17 deletions
diff --git a/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php b/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php index c17a954..4f73254 100644 --- a/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php +++ b/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php @@ -60,7 +60,7 @@ class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderIn throw new BadCredentialsException('No pre-authenticated principal found in request.'); } - $user = $this->userProvider->loadUserByUsername($user); + $user = $this->userProvider->loadUserByUsername($user); $this->userChecker->checkPostAuth($user); diff --git a/Core/Encoder/MessageDigestPasswordEncoder.php b/Core/Encoder/MessageDigestPasswordEncoder.php index 03de228..1706fc8 100644 --- a/Core/Encoder/MessageDigestPasswordEncoder.php +++ b/Core/Encoder/MessageDigestPasswordEncoder.php @@ -55,7 +55,7 @@ class MessageDigestPasswordEncoder extends BasePasswordEncoder $digest = hash($this->algorithm, $salted, true); // "stretch" hash - for ($i = 1; $i < $this->iterations; $i++) { + for ($i = 1; $i < $this->iterations; ++$i) { $digest = hash($this->algorithm, $digest.$salted, true); } diff --git a/Core/Encoder/Pbkdf2PasswordEncoder.php b/Core/Encoder/Pbkdf2PasswordEncoder.php index dac1cad..6f24c4f 100644 --- a/Core/Encoder/Pbkdf2PasswordEncoder.php +++ b/Core/Encoder/Pbkdf2PasswordEncoder.php @@ -87,11 +87,11 @@ class Pbkdf2PasswordEncoder extends BasePasswordEncoder $blocks = ceil($length / strlen(hash($algorithm, null, true))); $digest = ''; - for ($i = 1; $i <= $blocks; $i++) { + for ($i = 1; $i <= $blocks; ++$i) { $ib = $block = hash_hmac($algorithm, $salt.pack('N', $i), $password, true); // Iterations - for ($j = 1; $j < $iterations; $j++) { + for ($j = 1; $j < $iterations; ++$j) { $ib ^= ($block = hash_hmac($algorithm, $block, $password, true)); } diff --git a/Core/Tests/Authorization/AccessDecisionManagerTest.php b/Core/Tests/Authorization/AccessDecisionManagerTest.php index 126bfe8..3c970d1 100644 --- a/Core/Tests/Authorization/AccessDecisionManagerTest.php +++ b/Core/Tests/Authorization/AccessDecisionManagerTest.php @@ -153,13 +153,13 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase protected function getVoters($grants, $denies, $abstains) { $voters = array(); - for ($i = 0; $i < $grants; $i++) { + for ($i = 0; $i < $grants; ++$i) { $voters[] = $this->getVoter(VoterInterface::ACCESS_GRANTED); } - for ($i = 0; $i < $denies; $i++) { + for ($i = 0; $i < $denies; ++$i) { $voters[] = $this->getVoter(VoterInterface::ACCESS_DENIED); } - for ($i = 0; $i < $abstains; $i++) { + for ($i = 0; $i < $abstains; ++$i) { $voters[] = $this->getVoter(VoterInterface::ACCESS_ABSTAIN); } diff --git a/Core/Tests/Encoder/BCryptPasswordEncoderTest.php b/Core/Tests/Encoder/BCryptPasswordEncoderTest.php index 4d9ca6d..ebd845d 100644 --- a/Core/Tests/Encoder/BCryptPasswordEncoderTest.php +++ b/Core/Tests/Encoder/BCryptPasswordEncoderTest.php @@ -40,7 +40,7 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase public function testCostInRange() { - for ($cost = 4; $cost <= 31; $cost++) { + for ($cost = 4; $cost <= 31; ++$cost) { new BCryptPasswordEncoder($cost); } } diff --git a/Core/Tests/Util/SecureRandomTest.php b/Core/Tests/Util/SecureRandomTest.php index 5dfe1c8..666af30 100644 --- a/Core/Tests/Util/SecureRandomTest.php +++ b/Core/Tests/Util/SecureRandomTest.php @@ -35,17 +35,17 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase { $b = $this->getBitSequence($secureRandom, 20000); $c = array(); - for ($i = 0; $i <= 15; $i++) { + for ($i = 0; $i <= 15; ++$i) { $c[$i] = 0; } - for ($j = 1; $j <= 5000; $j++) { + for ($j = 1; $j <= 5000; ++$j) { $k = 4 * $j - 1; ++$c[8 * $b[$k - 3] + 4 * $b[$k - 2] + 2 * $b[$k - 1] + $b[$k]]; } $f = 0; - for ($i = 0; $i <= 15; $i++) { + for ($i = 0; $i <= 15; ++$i) { $f += $c[$i] * $c[$i]; } @@ -64,7 +64,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase $b = $this->getBitSequence($secureRandom, 20000); $runs = array(); - for ($i = 1; $i <= 6; $i++) { + for ($i = 1; $i <= 6; ++$i) { $runs[$i] = 0; } @@ -78,7 +78,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase $currentRun = 0; $lastBit = null; - for ($i = 0; $i < 20000; $i++) { + for ($i = 0; $i < 20000; ++$i) { if ($lastBit === $b[$i]) { ++$currentRun; } else { @@ -113,7 +113,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase $longestRun = $currentRun = 0; $lastBit = null; - for ($i = 0; $i < 20000; $i++) { + for ($i = 0; $i < 20000; ++$i) { if ($lastBit === $b[$i]) { ++$currentRun; } else { @@ -142,7 +142,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase $b = $this->getBitSequence($secureRandom, 20000); $Z = 0; - for ($i = 0; $i < 5000; $i++) { + for ($i = 0; $i < 5000; ++$i) { $Z += $b[$i] === $b[$i + $shift] ? 1 : 0; } diff --git a/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php b/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php index 54258e3..72e08c0 100644 --- a/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php +++ b/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php @@ -18,7 +18,7 @@ use Symfony\Component\Validator\Validation; * @author Bernhard Schussek <bschussek@gmail.com> * @group legacy */ -class LegacyUserPasswordValidatorApiTest extends UserPasswordValidatorTest +class LegacyUserPasswordValidatorTest extends UserPasswordValidatorTest { protected function getApiVersion() { diff --git a/Core/Util/StringUtils.php b/Core/Util/StringUtils.php index e68347f..343585c 100644 --- a/Core/Util/StringUtils.php +++ b/Core/Util/StringUtils.php @@ -60,7 +60,7 @@ class StringUtils $result = 0; - for ($i = 0; $i < $knownLen; $i++) { + for ($i = 0; $i < $knownLen; ++$i) { $result |= (ord($knownString[$i]) ^ ord($userInput[$i])); } |