From 8929f2da8ef6fb9330799734a73a352c3ac0a3b0 Mon Sep 17 00:00:00 2001 From: Marcus Olsson Date: Mon, 7 Nov 2016 17:17:51 +0100 Subject: [PATCH 1/4] Much needed dependancy updates. New zxcvbn-php version; fixed the stupid ocular/testbench perfomance issues. --- composer.json | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 522b7fc..a7e598a 100644 --- a/composer.json +++ b/composer.json @@ -21,13 +21,12 @@ ], "require": { "php" : ">=5.3.0", - "illuminate/support": "~5.1", - "bjeavons/zxcvbn-php": "0.1.4" + "illuminate/support": "~5.3", + "bjeavons/zxcvbn-php": "^0.2" }, "require-dev": { "phpunit/phpunit" : "4.*", - "orchestra/testbench": "~3.0", - "scrutinizer/ocular": "~1.1" + "orchestra/testbench": "~3.3" }, "autoload": { "psr-4": { @@ -44,7 +43,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "minimum-stability": "stable" From 16c8d9638f2d1d83ff2dd8a547c71bf64e96ac25 Mon Sep 17 00:00:00 2001 From: Marcus Olsson Date: Mon, 7 Nov 2016 17:18:00 +0100 Subject: [PATCH 2/4] Laravel 5.3 loading method. --- src/ZxcvbnServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ZxcvbnServiceProvider.php b/src/ZxcvbnServiceProvider.php index 8626b42..00940e9 100644 --- a/src/ZxcvbnServiceProvider.php +++ b/src/ZxcvbnServiceProvider.php @@ -74,8 +74,8 @@ class ZxcvbnServiceProvider extends ServiceProvider */ public function register() { - $this->app['zxcvbn'] = $this->app->share(function ($app) { - return new ZxcvbnPhp($this->app['config']); + $this->app->bind('zxcvbn', function ($app) { + return new ZxcvbnPhp(); }); } } From 3848e7831c7168ab5aa264c021f3756b23def060 Mon Sep 17 00:00:00 2001 From: Marcus Olsson Date: Mon, 7 Nov 2016 17:18:18 +0100 Subject: [PATCH 3/4] Fixed major flaw in documentation. --- LICENSE.md | 2 +- README.md | 37 ++++++++++++++++++++++--------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 9134fe3..e4671f0 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # The MIT License (MIT) -Copyright (c) 2015 Marcus Olsson +Copyright (c) 2016 Marcus Olsson > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 41e30ed..057c71c 100644 --- a/README.md +++ b/README.md @@ -40,22 +40,23 @@ If you've added `Olssonm\Zxcvbn` as an alias, your can access Zxcvbn easily from ``` php passwordStrength('password')); + $zxcvbn = Zxcvbn::passwordStrength('password'); + dd($zxcvbn); - // array:6 [ - // "crack_time" => 5.0E-5 - // "calc_time" => 0.1857271194458 - // "password" => "password" - // "entropy" => 0.0 - // "match_sequence" => array:1 [] - // "score" => 0 + // array:6 [▼ + // "crack_time" => 5.0E-5 + // "calc_time" => 0.12961101531982 + // "password" => "password" + // "entropy" => 0.0 + // "match_sequence" => array:1 [] + // "score" => 0 // ] } } @@ -72,8 +73,11 @@ The package gives you two different validation rules that you may use; `zxcvbn_m `zxcvbn_min` allows you to set up a rule for minimum score that the value beeing tested should adhere to. -***Syntax*** -`'input' => 'zxcvbn_min:min_value'` +**Syntax** + + input' => 'zxcvbn_min:min_value' + +**Example** ``` php 'xcvbn_dictionary:username,email'` +**Syntax** + + 'input' => 'xcvbn_dictionary:username,email' + +**Example** ``` php Date: Mon, 7 Nov 2016 17:19:16 +0100 Subject: [PATCH 4/4] No more PHP 5.5-tests; fixed travis retry-error. --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f30edda..22a95c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,11 @@ language: php php: - - 5.5 - 5.6 - 7.0 - nightly -before_script: composer install +before_script: + - travis_retry composer self-update + - travis_retry composer install --prefer-dist --no-interaction + +script: phpunit