-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
235 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/vendor | ||
/composer.lock | ||
/clover.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
language: php | ||
|
||
sudo: false | ||
|
||
php: | ||
- 7 | ||
- 7.1 | ||
- 7.2 | ||
- nightly | ||
|
||
env: TMPDIR=/tmp USE_XDEBUG=false | ||
|
||
branches: | ||
only: | ||
master | ||
|
||
before_install: | ||
- travis_retry composer self-update | ||
|
||
install: | ||
- phpenv rehash | ||
- travis_retry composer install --no-interaction --prefer-source | ||
|
||
stages: | ||
- test | ||
- phpstan analysis | ||
- test with coverage | ||
|
||
before_script: | ||
- if [[ "$USE_XDEBUG" == false ]]; then phpenv config-rm xdebug.ini || return 0; fi | ||
|
||
script: | ||
- composer test | ||
|
||
jobs: | ||
fast_finish: true | ||
allow_failures: | ||
- php: nightly | ||
include: | ||
- stage: phpstan analysis | ||
php: 7.1 | ||
env: TMPDIR=/tmp USE_XDEBUG=false | ||
script: | ||
- composer phpstan | ||
- stage: test with coverage | ||
php: 7.1 | ||
env: TMPDIR=/tmp USE_XDEBUG=true | ||
script: | ||
- composer test-with-coverage | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) -f ./clover.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Copyright (c) 2005-2015, Zend Technologies USA, Inc. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of Zend Technologies USA, Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived from this | ||
software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Zend Framework 1 - Crypt | ||
============================ | ||
[](https://travis-ci.org/diablomedia/zf1-crypt) | ||
[](https://codecov.io/gh/diablomedia/zf1-crypt) | ||
[](https://packagist.org/packages/diablomedia/zendframework1-crypt) | ||
[](https://packagist.org/packages/diablomedia/zendframework1-crypt) | ||
[](https://packagist.org/packages/diablomedia/zendframework1-crypt) | ||
|
||
This is just the Zend_Crypt component extracted from our fork of the Zend Framework 1 repo (https://github.com/diablomedia/zf1). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"name": "diablomedia/zendframework1-crypt", | ||
"description": "Zend Framework 1 Crypt component", | ||
"type": "library", | ||
"keywords": [ | ||
"framework", | ||
"zf1" | ||
], | ||
"homepage": "http://framework.zend.com/", | ||
"license": "BSD-3-Clause", | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"require": { | ||
"php": ">=7.0.0", | ||
"diablomedia/zendframework1-exception": "^1.0.0" | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"Zend_": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-0": { | ||
"Zend_": "tests/" | ||
} | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "vcs", | ||
"no-api": true, | ||
"url": "https://github.com/diablomedia/phpstorm-stubs" | ||
} | ||
], | ||
"require-dev": { | ||
"phpunit/phpunit": "^6.0", | ||
"phpstan/phpstan": "^0.9.2", | ||
"jetbrains/phpstorm-stubs": "dev-phpstan" | ||
}, | ||
"archive": { | ||
"exclude": ["/tests"] | ||
}, | ||
"scripts": { | ||
"test": "phpunit ./tests", | ||
"test-with-coverage": "phpunit --coverage-clover=clover.xml ./tests", | ||
"phpstan": "phpstan analyze -l7 -c phpstan.neon --no-progress ./src --ansi" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
if (!extension_loaded('gmp')) { | ||
require_once __DIR__ . '/vendor/jetbrains/phpstorm-stubs/gmp/gmp.php'; | ||
} | ||
|
||
if (!extension_loaded('mcrypt')) { | ||
require_once __DIR__ . '/vendor/jetbrains/phpstorm-stubs/mcrypt/mcrypt.php'; | ||
} | ||
|
||
if (!extension_loaded('hash')) { | ||
require_once __DIR__ . '/vendor/jetbrains/phpstorm-stubs/hash/hash.php'; | ||
} | ||
// The hash extension may emulate the mhash extension if PHP is configured with --with-mhash | ||
// otherwise the mhash* functions/constants won't exist | ||
if (!function_exists('mhash')) { | ||
require_once __DIR__ . '/vendor/jetbrains/phpstorm-stubs/mhash/mhash.php'; | ||
} | ||
|
||
if (!extension_loaded('openssl')) { | ||
require_once __DIR__ . '/vendor/jetbrains/phpstorm-stubs/openssl/openssl.php'; | ||
} else { | ||
// Only defined when php/openssl compiled with MD2 support | ||
if (!defined('OPENSSL_ALGO_MD2')) { | ||
define('OPENSSL_ALGO_MD2', 4); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
parameters: | ||
bootstrap: %rootDir%/../../../phpstan-bootstrap.php | ||
ignoreErrors: | ||
- '#Casting to .+ something that.s already .+\.#' | ||
# This does only have one parameter, not sure intent here | ||
- '#Class Zend_Crypt_Rsa_Key_Public constructor invoked with 2 parameters, 1 required\.#' | ||
# This should probably be changed to a do/while loop instead of just while, Zend_Crypt_Math_BigInteger_Bcmath:215 | ||
- '#Variable \$hex might not be defined\.#' | ||
# Possibly issues with stubs, haven't researched | ||
- '#Parameter \#1 \$gmpnumber of function gmp_strval expects resource\|string, GMP given\.#' | ||
- '#Parameter \#1 \$gmpnumber of function gmp_strval expects resource\|string, int given\.#' | ||
- '#Parameter \#1 \$a of function gmp_sqrt expects resource\|string, object\|resource\|string given\.#' | ||
- '#Parameter \#2 \$b of function gmp_mul expects resource\|string, int given\.#' | ||
# These methods exist on Zend_Crypt_Math but $_math property is typehinted as Zend_Crypt_Math_BigInteger_Interface | ||
- '#Call to an undefined method Zend_Crypt_Math_BigInteger::fromBinary\(\)\.#' | ||
- '#Call to an undefined method Zend_Crypt_Math_BigInteger::toBinary\(\)\.#' | ||
- '#Call to an undefined method Zend_Crypt_Math_BigInteger::btwoc\(\)\.#' | ||
- '#Call to an undefined method Zend_Crypt_Math_BigInteger::rand\(\)\.#' | ||
# Isset calls probably aren't necessary here, Zend_Crypt_Hmac:89|110 | ||
- '#Variable \$key in isset\(\) always exists and is not nullable\.#' | ||
- '#Variable \$hash in isset\(\) always exists and is not nullable\.#' | ||
# Probably unnecessary is_float check, Zend_Crypt_Math:121 | ||
- '#Call to function is_float\(\) will always evaluate to false\.#' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<phpunit | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
beStrictAboutTestsThatDoNotTestAnything="true" | ||
backupGlobals="true" | ||
stderr="true" | ||
colors="true"> | ||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">./src</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ | |
* @version $Id$ | ||
*/ | ||
|
||
require_once 'Zend/Crypt/Math/BigInteger/Bcmath.php'; | ||
|
||
/** | ||
* @category Zend | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters