Skip to content

Commit

Permalink
upd: dependencies, do not use deprecated mcrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
j-schumann committed Oct 10, 2017
1 parent 16281cb commit 5295b03
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 24 deletions.
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,28 @@

The project follows Semantic Versioning (http://semver.org/)

## 4.0.2 - @todo
# 5.0.0 - tbd
### Removed
- Vrok\RandomLib\Source\Mcrypt - mcrypt is deprecated and removed with PHP 7.2

## 4.1.0 - 2017-10-10
### Added
- Travis config
- code style config

### Fixed
- NumberFormat did not use preset decimals

### Changed
- updated ZF and other dependencies
- do not automatically use deprecated RandomLib mcrypt source
- applied code style fixer
- upgraded phpunit tests
- NumberFormatterStrategy::hydrate now rounds values

## 4.0.1 - 2017-02-02
### Fixed
- dependencies
- updated ZF and other dependencies

## 4.0.0 - 2017-02-02
### Added
Expand Down
31 changes: 16 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,35 @@
"keywords": ["zf3", "doctrine", "auth"],
"homepage": "http://www.vrok.de/",
"minimum-stability": "dev",
"prefer-stable": true,

"require": {
"php": ">=7.1",
"doctrine/doctrine-orm-module": "^1.1.1",
"doctrine/doctrine-orm-module": "^1.1.5",
"gedmo/doctrine-extensions": "^3.0.0",
"ircmaxell/random-lib": "^1.2.0",
"ocramius/proxy-manager": "^2.1.0",
"rwoverdijk/assetmanager": "^1.7.1",
"ocramius/proxy-manager": "^2.1.1",
"rwoverdijk/assetmanager": "^1.7.3",
"zendframework/zend-component-installer": "^0.6.0",
"zendframework/zend-filter": "^2.7.1",
"zendframework/zend-hydrator": "^2.2.1",
"zendframework/zend-inputfilter": "^2.7.3",
"zendframework/zend-log": "^2.9.1",
"zendframework/zend-i18n": "^2.7.3",
"zendframework/zend-mail": "^2.7.2",
"zendframework/zend-filter": "^2.7.2",
"zendframework/zend-hydrator": "^2.3.1",
"zendframework/zend-inputfilter": "^2.7.4",
"zendframework/zend-log": "^2.9.2",
"zendframework/zend-i18n": "^2.7.4",
"zendframework/zend-mail": "^2.8.0",
"zendframework/zend-math": "^3.0.0",
"zendframework/zend-mvc": "^3.0.4",
"zendframework/zend-mvc": "^3.1.0",
"zendframework/zend-mvc-console": "^1.1.11",
"zendframework/zend-mvc-form": "^1.0.0",
"zendframework/zend-mvc-i18n": "^1.0.0",
"zendframework/zend-mvc-plugin-flashmessenger": "^1.0.0",
"zendframework/zend-mvc-plugin-identity": "^1.0.0",
"zendframework/zend-navigation": "^2.8.1",
"zendframework/zend-navigation": "^2.8.2",
"zendframework/zend-serializer": "^2.8.0",
"zendframework/zend-validator": "^2.8.2"
"zendframework/zend-validator": "^2.10.1"
},
"require-dev": {
"phpunit/PHPUnit": "^6.3.1",
"phpunit/PHPUnit": "^6.4.1",
"zendframework/zend-coding-standard": "~1.0.0"
},
"suggest": {
Expand All @@ -46,8 +47,8 @@
},
"extra": {
"branch-alias": {
"dev-dev": "4.1.x-dev",
"dev-master": "4.0.x-dev"
"dev-dev": "5.0.x-dev",
"dev-master": "4.1.x-dev"
}
},
"scripts": {
Expand Down
10 changes: 3 additions & 7 deletions src/Stdlib/Random.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ protected static function getGenerator()
}

$factory = new Factory();

// register additional sources not available in RandomLib v1.2.0
// @todo check if implemented in a new version
$factory->registerSource('Mcrypt', 'Vrok\RandomLib\Source\Mcrypt');

static::$generator = $factory->getMediumStrengthGenerator();
return static::$generator;
}
Expand Down Expand Up @@ -112,10 +107,11 @@ public static function getRandomToken($length, $type = self::OUTPUT_ALNUM)
}

$token = '';
// re-request bytes if our $length => $byteCount conversion was bad
do {
$token .= self::getRandomBytes($byteCount, $type);
} while (strlen($token) < $length);
}
// re-request bytes if our $length => $byteCount conversion was bad
while (strlen($token) < $length);

return substr($token, 0, $length);
}
Expand Down

0 comments on commit 5295b03

Please sign in to comment.