diff --git a/.travis.yml b/.travis.yml index 074f4534..9bf2bfb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,13 +28,13 @@ jobs: php: 7.1 install: # Install Nette Code Checker - - travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-progress + - travis_retry composer create-project nette/code-checker temp/code-checker ^3 --no-progress # Install Nette Coding Standard - - travis_retry composer create-project nette/coding-standard temp/coding-standard --no-progress + - travis_retry composer create-project nette/coding-standard temp/coding-standard ^2 --no-progress script: - - php temp/code-checker/src/code-checker.php --short-arrays --strict-types - - php temp/coding-standard/ecs check src tests --config temp/coding-standard/coding-standard-php71.neon + - php temp/code-checker/code-checker --strict-types + - php temp/coding-standard/ecs check src tests --config temp/coding-standard/coding-standard-php71.yml - stage: Code Coverage diff --git a/src/Security/Passwords.php b/src/Security/Passwords.php index 19e6702f..da71f4bc 100644 --- a/src/Security/Passwords.php +++ b/src/Security/Passwords.php @@ -29,7 +29,7 @@ class Passwords /** * See http://php.net/manual/en/password.constants.php */ - public function __construct(int $algo = PASSWORD_BCRYPT, array $options = []) + public function __construct(int $algo = PASSWORD_DEFAULT, array $options = []) { $this->algo = $algo; $this->options = $options; diff --git a/tests/Security/MockUserStorage.php b/tests/Security/MockUserStorage.php index b81088ee..07f0a1e6 100644 --- a/tests/Security/MockUserStorage.php +++ b/tests/Security/MockUserStorage.php @@ -1,4 +1,5 @@ hash('')) + preg_match('#^\$.{50,}\z#', (new Passwords)->hash('')) ); Assert::truthy( diff --git a/tests/bootstrap.php b/tests/bootstrap.php index cf4b918d..19fc4b32 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,4 +1,5 @@